Class: BMT::Methodology
- Inherits:
-
Object
- Object
- BMT::Methodology
- Defined in:
- lib/bmt/methodology.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
-
#vrt_version ⇒ Object
readonly
Returns the value of attribute vrt_version.
Instance Method Summary collapse
-
#initialize(key:, version:, attributes: {}) ⇒ Methodology
constructor
A new instance of Methodology.
- #release_date ⇒ Object
- #steps ⇒ Object
Constructor Details
#initialize(key:, version:, attributes: {}) ⇒ Methodology
Returns a new instance of Methodology.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/bmt/methodology.rb', line 5 def initialize(key:, version:, attributes: {}) @key = key @version = version @title = attributes.dig('metadata', 'title') @release_date = attributes.dig('metadata', 'release_date') @description = attributes.dig('metadata', 'description') @vrt_version = attributes.dig('metadata', 'vrt_version') @steps_data = attributes.dig('content', 'steps') end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/bmt/methodology.rb', line 3 def description @description end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
3 4 5 |
# File 'lib/bmt/methodology.rb', line 3 def key @key end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/bmt/methodology.rb', line 3 def title @title end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
3 4 5 |
# File 'lib/bmt/methodology.rb', line 3 def version @version end |
#vrt_version ⇒ Object (readonly)
Returns the value of attribute vrt_version.
3 4 5 |
# File 'lib/bmt/methodology.rb', line 3 def vrt_version @vrt_version end |
Instance Method Details
#release_date ⇒ Object
16 17 18 |
# File 'lib/bmt/methodology.rb', line 16 def release_date Date.parse(@release_date) end |