Class: Fabricio::Model::Organization

Inherits:
AbstractModel show all
Defined in:
lib/fabricio/models/organization.rb

Overview

This model represents an organization

Instance Attribute Summary collapse

Attributes inherited from AbstractModel

#json

Instance Method Summary collapse

Methods inherited from AbstractModel

#method_missing

Constructor Details

#initialize(attributes) ⇒ Fabricio::Model::Organization

Returns a Build model object

Parameters:

  • attributes (Hash)


13
14
15
16
17
18
19
# File 'lib/fabricio/models/organization.rb', line 13

def initialize(attributes)
  @id = attributes['id']
  @alias = attributes['alias']
  @name = attributes['name']
  @apps_counts = attributes['apps_counts']
  @json = attributes
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Fabricio::Model::AbstractModel

Instance Attribute Details

#aliasObject (readonly)

Returns the value of attribute alias.



7
8
9
# File 'lib/fabricio/models/organization.rb', line 7

def alias
  @alias
end

#apps_countsObject (readonly)

Returns the value of attribute apps_counts.



7
8
9
# File 'lib/fabricio/models/organization.rb', line 7

def apps_counts
  @apps_counts
end

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/fabricio/models/organization.rb', line 7

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/fabricio/models/organization.rb', line 7

def name
  @name
end