Sha256: a3d260249300b543f2cb47e865edcdfe27dbd7226d816f5c331b85cdaca4734d

Contents?: true

Size: 673 Bytes

Versions: 1

Compression:

Stored size: 673 Bytes

Contents

require 'moblues/generator/base/type'

module Moblues
  module Generator
    module Objc
      class Type < Base::Type
        def initialize
          super(OBJC)
        end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moblues-0.4.0 lib/moblues/generator/objc/type.rb