Class: STDDAPI::Objects::Run
- Inherits:
-
Object
- Object
- STDDAPI::Objects::Run
- Defined in:
- lib/objects.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#revision ⇒ Object
Returns the value of attribute revision.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(project_id, name, source = "", revision = "") ⇒ Run
constructor
A new instance of Run.
- #to_json ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(project_id, name, source = "", revision = "") ⇒ Run
Returns a new instance of Run.
31 32 33 34 35 36 37 |
# File 'lib/objects.rb', line 31 def initialize(project_id,name,source="",revision="") @project_id = project_id @name = name @source = source @revision = revision end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
38 39 40 |
# File 'lib/objects.rb', line 38 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
38 39 40 |
# File 'lib/objects.rb', line 38 def name @name end |
#project_id ⇒ Object
Returns the value of attribute project_id.
38 39 40 |
# File 'lib/objects.rb', line 38 def project_id @project_id end |
#revision ⇒ Object
Returns the value of attribute revision.
38 39 40 |
# File 'lib/objects.rb', line 38 def revision @revision end |
#source ⇒ Object
Returns the value of attribute source.
38 39 40 |
# File 'lib/objects.rb', line 38 def source @source end |
Instance Method Details
#to_json ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/objects.rb', line 46 def to_json { 'name' => @name, 'project_id' => @project_id, 'source'=> @source, 'revision'=>@revision }.to_json end |
#to_s ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/objects.rb', line 39 def to_s "name: #{@name}\n"+ "id: #{@id}\n"+ "project-id: #{@project_id}\n"+ "source: #{@source}\n"+ "revision: #{@revision}\n" end |