Class: Dialekt::Model::BasicProperty::Shape

Inherits:
Object
  • Object
show all
Defined in:
lib/dialekt/model/basic_property.rb

Overview

Property configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type:, factory: nil, transformer: nil) ⇒ Shape

Returns a new instance of Shape.



11
12
13
14
15
16
# File 'lib/dialekt/model/basic_property.rb', line 11

def initialize(name:, type:, factory: nil, transformer: nil)
  @name = name.to_sym
  @type = type
  @factory = factory&.call_adapter
  @transformer = transformer&.call_adapter
end

Instance Attribute Details

#factoryObject (readonly)

Returns the value of attribute factory.



9
10
11
# File 'lib/dialekt/model/basic_property.rb', line 9

def factory
  @factory
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/dialekt/model/basic_property.rb', line 9

def name
  @name
end

#transformerObject (readonly)

Returns the value of attribute transformer.



9
10
11
# File 'lib/dialekt/model/basic_property.rb', line 9

def transformer
  @transformer
end

#typeObject (readonly)

Returns the value of attribute type.



9
10
11
# File 'lib/dialekt/model/basic_property.rb', line 9

def type
  @type
end