Class: Trello::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/trello/schema.rb,
lib/trello/schema/attribute/base.rb,
lib/trello/schema/serializer/time.rb,
lib/trello/schema/attribute/default.rb,
lib/trello/schema/attribute_builder.rb,
lib/trello/schema/serializer/labels.rb,
lib/trello/schema/serializer/default.rb,
lib/trello/schema/serializer/webhooks.rb,
lib/trello/schema/attribute/board_pref.rb,
lib/trello/schema/attribute_registration.rb,
lib/trello/schema/attribute/custom_field_display.rb

Defined Under Namespace

Modules: Attribute, Serializer Classes: AttributeBuilder, AttributeRegistration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSchema

Returns a new instance of Schema.



22
23
24
# File 'lib/trello/schema.rb', line 22

def initialize
  @attrs = ActiveSupport::HashWithIndifferentAccess.new
end

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.



20
21
22
# File 'lib/trello/schema.rb', line 20

def attrs
  @attrs
end

Instance Method Details

#attribute(name, options = {}) ⇒ Object



26
27
28
29
# File 'lib/trello/schema.rb', line 26

def attribute(name, options={})
  @attrs[name] = AttributeBuilder.build(name, options)
  self
end