Class: Helium::Library
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Resource
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(opts = {}) ⇒ Library
constructor
A new instance of Library.
Methods inherited from Resource
#==, all, all_path, #as_json, create, #created_at, #destroy, #eql?, find, #hash, initialize_from_path, #metadata, resource_name, #resource_name, #resource_path, singleton, #to_json, #update, #updated_at
Methods included from Utils
Constructor Details
#initialize(opts = {}) ⇒ Library
Returns a new instance of Library.
21 22 23 24 25 |
# File 'lib/helium/helium_script.rb', line 21 def initialize(opts = {}) super(opts) @name = @params.dig('attributes', 'name') @digest = @params.dig('meta', 'digest') end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/helium/helium_script.rb', line 19 def name @name end |
Instance Method Details
#content ⇒ Object
27 28 29 30 |
# File 'lib/helium/helium_script.rb', line 27 def content @content ||= @client.get(resource_path+'/content', content_type: 'application/octet-stream').body end |