Class: Proxy::Omaha::Metadata
- Inherits:
-
Object
- Object
- Proxy::Omaha::Metadata
- Defined in:
- lib/smart_proxy_omaha/metadata.rb
Instance Attribute Summary collapse
-
#architecture ⇒ Object
Returns the value of attribute architecture.
-
#release ⇒ Object
Returns the value of attribute release.
-
#sha1_b64 ⇒ Object
Returns the value of attribute sha1_b64.
-
#sha256_b64 ⇒ Object
Returns the value of attribute sha256_b64.
-
#size ⇒ Object
Returns the value of attribute size.
-
#track ⇒ Object
Returns the value of attribute track.
Instance Method Summary collapse
-
#initialize(params) ⇒ Metadata
constructor
A new instance of Metadata.
- #to_json ⇒ Object
Constructor Details
#initialize(params) ⇒ Metadata
Returns a new instance of Metadata.
5 6 7 8 9 10 11 12 13 |
# File 'lib/smart_proxy_omaha/metadata.rb', line 5 def initialize(params) symbolize_keys_deep!(params) @release = params.fetch(:release) @architecture = params.fetch(:architecture) @sha1_b64 = params.fetch(:sha1_b64) @sha256_b64 = params.fetch(:sha256_b64) @size = params.fetch(:size) @track = params.fetch(:track) end |
Instance Attribute Details
#architecture ⇒ Object
Returns the value of attribute architecture.
3 4 5 |
# File 'lib/smart_proxy_omaha/metadata.rb', line 3 def architecture @architecture end |
#release ⇒ Object
Returns the value of attribute release.
3 4 5 |
# File 'lib/smart_proxy_omaha/metadata.rb', line 3 def release @release end |
#sha1_b64 ⇒ Object
Returns the value of attribute sha1_b64.
3 4 5 |
# File 'lib/smart_proxy_omaha/metadata.rb', line 3 def sha1_b64 @sha1_b64 end |
#sha256_b64 ⇒ Object
Returns the value of attribute sha256_b64.
3 4 5 |
# File 'lib/smart_proxy_omaha/metadata.rb', line 3 def sha256_b64 @sha256_b64 end |
#size ⇒ Object
Returns the value of attribute size.
3 4 5 |
# File 'lib/smart_proxy_omaha/metadata.rb', line 3 def size @size end |
#track ⇒ Object
Returns the value of attribute track.
3 4 5 |
# File 'lib/smart_proxy_omaha/metadata.rb', line 3 def track @track end |
Instance Method Details
#to_json ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/smart_proxy_omaha/metadata.rb', line 15 def to_json { :release => release, :architecture => architecture, :sha1_b64 => sha1_b64, :sha256_b64 => sha256_b64, :size => size, :track => track, }.to_json end |