Class: STDDAPI::Objects::Feature
- Inherits:
-
Object
- Object
- STDDAPI::Objects::Feature
- Defined in:
- lib/objects.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#description ⇒ Object
Returns the value of attribute description.
-
#file ⇒ Object
Returns the value of attribute file.
-
#id ⇒ Object
Returns the value of attribute id.
-
#module_id ⇒ Object
Returns the value of attribute module_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(module_id, name, date) ⇒ Feature
constructor
A new instance of Feature.
- #to_json ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(module_id, name, date) ⇒ Feature
Returns a new instance of Feature.
84 85 86 87 88 89 |
# File 'lib/objects.rb', line 84 def initialize(module_id,name,date) @module_id = module_id @name = name @date = date = [] end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
90 91 92 |
# File 'lib/objects.rb', line 90 def date @date end |
#description ⇒ Object
Returns the value of attribute description.
90 91 92 |
# File 'lib/objects.rb', line 90 def description @description end |
#file ⇒ Object
Returns the value of attribute file.
90 91 92 |
# File 'lib/objects.rb', line 90 def file @file end |
#id ⇒ Object
Returns the value of attribute id.
90 91 92 |
# File 'lib/objects.rb', line 90 def id @id end |
#module_id ⇒ Object
Returns the value of attribute module_id.
90 91 92 |
# File 'lib/objects.rb', line 90 def module_id @module_id end |
#name ⇒ Object
Returns the value of attribute name.
90 91 92 |
# File 'lib/objects.rb', line 90 def name @name end |
#tags ⇒ Object
Returns the value of attribute tags.
90 91 92 |
# File 'lib/objects.rb', line 90 def end |
Instance Method Details
#to_json ⇒ Object
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/objects.rb', line 100 def to_json { 'name' => @name, 'module_id' => @module_id, 'date'=>@date, 'description'=>@description, 'tags'=>, 'file'=>@file }.to_json end |
#to_s ⇒ Object
91 92 93 94 95 96 97 98 99 |
# File 'lib/objects.rb', line 91 def to_s "name: #{@name}\n"+ "id: #{@id}\n"+ "module-id: #{@module_id}\n"+ "date: #{@date}\n"+ "description: #{@description}\n"+ "tags: #{@tags}\n"+ "file: #{@file}\n" end |