Class: Legato::Management::Segment
- Inherits:
-
Object
- Object
- Legato::Management::Segment
- Extended by:
- Finder
- Defined in:
- lib/legato/management/segment.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
Returns the value of attribute definition.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes, user) ⇒ Segment
constructor
A new instance of Segment.
- #path ⇒ Object
Methods included from Finder
Constructor Details
#initialize(attributes, user) ⇒ Segment
Returns a new instance of Segment.
16 17 18 19 20 21 |
# File 'lib/legato/management/segment.rb', line 16 def initialize(attributes, user) self.user = user self.id = attributes['id'] self.name = attributes['name'] self.definition = attributes['definition'] end |
Instance Attribute Details
#definition ⇒ Object
Returns the value of attribute definition.
14 15 16 |
# File 'lib/legato/management/segment.rb', line 14 def definition @definition end |
#id ⇒ Object
Returns the value of attribute id.
14 15 16 |
# File 'lib/legato/management/segment.rb', line 14 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/legato/management/segment.rb', line 14 def name @name end |
#user ⇒ Object
Returns the value of attribute user.
14 15 16 |
# File 'lib/legato/management/segment.rb', line 14 def user @user end |
Class Method Details
.default_path ⇒ Object
6 7 8 |
# File 'lib/legato/management/segment.rb', line 6 def self.default_path "/segments" end |
Instance Method Details
#path ⇒ Object
10 11 12 |
# File 'lib/legato/management/segment.rb', line 10 def path "/segments/#{id}" end |