Class: STDDAPI::Objects::Module
- Inherits:
-
Object
- Object
- STDDAPI::Objects::Module
- Defined in:
- lib/objects.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#name ⇒ Object
Returns the value of attribute name.
-
#run_id ⇒ Object
Returns the value of attribute run_id.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#stop_time ⇒ Object
Returns the value of attribute stop_time.
Instance Method Summary collapse
-
#initialize(run_id, name, kind, start_time) ⇒ Module
constructor
A new instance of Module.
- #to_json ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(run_id, name, kind, start_time) ⇒ Module
Returns a new instance of Module.
57 58 59 60 61 62 63 |
# File 'lib/objects.rb', line 57 def initialize(run_id,name,kind,start_time) @run_id = run_id @name = name @kind = kind @start_time = start_time end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
64 65 66 |
# File 'lib/objects.rb', line 64 def id @id end |
#kind ⇒ Object
Returns the value of attribute kind.
64 65 66 |
# File 'lib/objects.rb', line 64 def kind @kind end |
#name ⇒ Object
Returns the value of attribute name.
64 65 66 |
# File 'lib/objects.rb', line 64 def name @name end |
#run_id ⇒ Object
Returns the value of attribute run_id.
64 65 66 |
# File 'lib/objects.rb', line 64 def run_id @run_id end |
#start_time ⇒ Object
Returns the value of attribute start_time.
64 65 66 |
# File 'lib/objects.rb', line 64 def start_time @start_time end |
#stop_time ⇒ Object
Returns the value of attribute stop_time.
64 65 66 |
# File 'lib/objects.rb', line 64 def stop_time @stop_time end |
Instance Method Details
#to_json ⇒ Object
72 73 74 75 76 77 78 79 80 |
# File 'lib/objects.rb', line 72 def to_json { 'name' => @name, 'run_id' => @run_id, 'kind' => @kind, 'start_time'=> @start_time, 'stop_time'=>@stop_time }.to_json end |
#to_s ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/objects.rb', line 65 def to_s "name: #{@name}\n"+ "id: #{@id}\n"+ "run-id: #{@run_id}\n"+ "kind: #{@kind}\n"+ "start-time: #{@start_time}\n" end |