Class: Moblues::Generator::Objc::Type

Inherits:
Base::Type
  • Object
show all
Defined in:
lib/moblues/generator/objc/type.rb

Constant Summary

Constants inherited from Base::Type

Base::Type::OBJC, Base::Type::SWIFT

Instance Method Summary collapse

Methods inherited from Base::Type

#attribute_type, #relationship_type

Constructor Details

#initializeType

Returns a new instance of Type.



7
8
9
# File 'lib/moblues/generator/objc/type.rb', line 7

def initialize
  super(OBJC)
end

Instance Method Details

#property_attributes(attribute) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/moblues/generator/objc/type.rb', line 11

def property_attributes(attribute)
  case attribute.type
  when :string
    %w{nonatomic copy}
  when :number, :decimal, :date, :data, :id
    %w{nonatomic strong}
  else
    raise ArgumentError.new("unknown type #{type}")
  end
end