Class: SalsaLabs::SalsaObject

Inherits:
Object
  • Object
show all
Defined in:
lib/salsa_labs/salsa_object.rb

Overview

Base class used for subclasses that can be represented by Salsa Labs concepts that can be returned by getObject or getObjects.

Direct Known Subclasses

Action, Supporter, SupporterAction

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ SalsaObject

Returns a new instance of SalsaObject.



10
11
12
# File 'lib/salsa_labs/salsa_object.rb', line 10

def initialize(params)
  @attributes = params
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



8
9
10
# File 'lib/salsa_labs/salsa_object.rb', line 8

def attributes
  @attributes
end

Instance Method Details

#organization_keyObject



14
15
16
# File 'lib/salsa_labs/salsa_object.rb', line 14

def organization_key
  (attributes['organization_key'] || 0).to_i
end