Class: Trello::Schema::AttributeRegistration

Inherits:
Object
  • Object
show all
Defined in:
lib/trello/schema/attribute_registration.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, attribute) ⇒ AttributeRegistration

Returns a new instance of AttributeRegistration.



12
13
14
15
# File 'lib/trello/schema/attribute_registration.rb', line 12

def initialize(klass, attribute)
  @klass = klass
  @attribute = attribute
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



10
11
12
# File 'lib/trello/schema/attribute_registration.rb', line 10

def attribute
  @attribute
end

#klassObject (readonly)

Returns the value of attribute klass.



10
11
12
# File 'lib/trello/schema/attribute_registration.rb', line 10

def klass
  @klass
end

Class Method Details

.register(klass, attribute) ⇒ Object



5
6
7
# File 'lib/trello/schema/attribute_registration.rb', line 5

def register(klass, attribute)
  new(klass, attribute).register
end

Instance Method Details

#registerObject



17
18
19
20
# File 'lib/trello/schema/attribute_registration.rb', line 17

def register
  define_getter
  define_setter
end