Class: Optimizely::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/optimizely/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Project

Returns a new instance of Project.



6
7
8
9
10
11
12
# File 'lib/optimizely/project.rb', line 6

def initialize(json)
  @json = json
  @project_name = json['project_name']
  @project_status = json['project_status']
  @id = json['id']
  @account_id = json['account_id']
end

Instance Attribute Details

#account_idObject (readonly)

Returns the value of attribute account_id.



4
5
6
# File 'lib/optimizely/project.rb', line 4

def 
  @account_id
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/optimizely/project.rb', line 4

def id
  @id
end

#project_nameObject (readonly)

Returns the value of attribute project_name.



4
5
6
# File 'lib/optimizely/project.rb', line 4

def project_name
  @project_name
end

#project_statusObject (readonly)

Returns the value of attribute project_status.



4
5
6
# File 'lib/optimizely/project.rb', line 4

def project_status
  @project_status
end

Instance Method Details

#[](x) ⇒ Object



14
15
16
# File 'lib/optimizely/project.rb', line 14

def [](x)
  return @json[x]
end