Class: ConfCtl::Swpins::DeployedInfo
- Inherits:
-
Object
- Object
- ConfCtl::Swpins::DeployedInfo
- Defined in:
- lib/confctl/swpins/deployed_info.rb
Instance Attribute Summary collapse
- #swpins ⇒ Hash readonly
Class Method Summary collapse
Instance Method Summary collapse
- #[](swpin) ⇒ Object
-
#initialize(hash) ⇒ DeployedInfo
constructor
A new instance of DeployedInfo.
Constructor Details
#initialize(hash) ⇒ DeployedInfo
Returns a new instance of DeployedInfo.
15 16 17 |
# File 'lib/confctl/swpins/deployed_info.rb', line 15 def initialize(hash) @swpins = hash end |
Instance Attribute Details
#swpins ⇒ Hash (readonly)
13 14 15 |
# File 'lib/confctl/swpins/deployed_info.rb', line 13 def swpins @swpins end |
Class Method Details
.parse!(json) ⇒ Object
6 7 8 9 10 |
# File 'lib/confctl/swpins/deployed_info.rb', line 6 def self.parse!(json) new(JSON.parse(json)) rescue JSON::ParserError => e raise Error, "unable to parse swpins info: #{e.}" end |
Instance Method Details
#[](swpin) ⇒ Object
19 20 21 |
# File 'lib/confctl/swpins/deployed_info.rb', line 19 def [](swpin) swpins[swpin] end |