Class: ProspectusTerraform::ModuleData
- Inherits:
-
Object
- Object
- ProspectusTerraform::ModuleData
- Defined in:
- lib/prospectus_terraform/modules.rb
Overview
Module object, for passing state and update info
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(params) ⇒ ModuleData
constructor
A new instance of ModuleData.
- #latest ⇒ Object
Constructor Details
#initialize(params) ⇒ ModuleData
Returns a new instance of ModuleData.
10 11 12 13 14 |
# File 'lib/prospectus_terraform/modules.rb', line 10 def initialize(params) @name = params['name'] @source = params['source'] @version = params['version'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/prospectus_terraform/modules.rb', line 8 def name @name end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
8 9 10 |
# File 'lib/prospectus_terraform/modules.rb', line 8 def source @source end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
8 9 10 |
# File 'lib/prospectus_terraform/modules.rb', line 8 def version @version end |
Instance Method Details
#latest ⇒ Object
16 17 18 19 |
# File 'lib/prospectus_terraform/modules.rb', line 16 def latest resp = JSON.parse(open(latest_url).read) # rubocop:disable Security/Open resp['version'] end |