Class: Hisui::Management::Segment

Inherits:
Base
  • Object
show all
Defined in:
lib/hisui/management/segment.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, base_uri

Constructor Details

#initialize(attributes, user) ⇒ Segment

Returns a new instance of Segment.



6
7
8
9
10
11
# File 'lib/hisui/management/segment.rb', line 6

def initialize(attributes, user)
  @id = attributes['id']
  @name = attributes['name']
  @definition = attributes['definition']
  @user = user
end

Instance Attribute Details

#definitionObject

Returns the value of attribute definition.



4
5
6
# File 'lib/hisui/management/segment.rb', line 4

def definition
  @definition
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/hisui/management/segment.rb', line 4

def id
  @id
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/hisui/management/segment.rb', line 4

def name
  @name
end

#userObject

Returns the value of attribute user.



4
5
6
# File 'lib/hisui/management/segment.rb', line 4

def user
  @user
end

Class Method Details

.default_pathObject



13
14
15
# File 'lib/hisui/management/segment.rb', line 13

def self.default_path
  "/segments"
end