Class: Rafflesia::Organization
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::Organization
- Defined in:
- lib/rafflesia/registry/organization.rb
Constant Summary collapse
- HASH_ATTRS =
{ display_name: :display_name, id: :id, slug: :slug }.freeze
Instance Attribute Summary collapse
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#slug ⇒ Object
Returns the value of attribute slug.
Instance Method Summary collapse
-
#initialize(json) ⇒ Organization
constructor
A new instance of Organization.
Constructor Details
#initialize(json) ⇒ Organization
Returns a new instance of Organization.
19 20 21 22 23 24 25 |
# File 'lib/rafflesia/registry/organization.rb', line 19 def initialize(json) super() hash = self.class.normalize(json) @display_name = hash[:display_name] @id = hash[:id] @slug = hash[:slug] end |
Instance Attribute Details
#display_name ⇒ Object
Returns the value of attribute display_name.
14 15 16 |
# File 'lib/rafflesia/registry/organization.rb', line 14 def display_name @display_name end |
#id ⇒ Object
Returns the value of attribute id.
14 15 16 |
# File 'lib/rafflesia/registry/organization.rb', line 14 def id @id end |
#slug ⇒ Object
Returns the value of attribute slug.
14 15 16 |
# File 'lib/rafflesia/registry/organization.rb', line 14 def slug @slug end |