class Moblues::Generator::Base::Type
Constants
- OBJC
- SWIFT
Attributes
attribute_types[R]
relationship_types[R]
Public Class Methods
new(params = SWIFT)
click to toggle source
# File lib/moblues/generator/base/type.rb, line 41 def initialize(params = SWIFT) @attribute_types = params.fetch(:attribute_types) @relationship_types = params.fetch(:relationship_types) end
Public Instance Methods
attribute_type(attribute)
click to toggle source
# File lib/moblues/generator/base/type.rb, line 46 def attribute_type(attribute) attribute_types.fetch(attribute.type) end
relationship_type(relationship)
click to toggle source
# File lib/moblues/generator/base/type.rb, line 50 def relationship_type(relationship) if relationship.to_many relationship.ordered ? relationship_types[:to_many_ordered] : relationship_types[:to_many] else relationship.destination_entity + relationship_types[:suffix] end end