Class: Helium::Script
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 = {}) ⇒ Script
constructor
A new instance of Script.
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 = {}) ⇒ Script
Returns a new instance of Script.
6 7 8 9 10 |
# File 'lib/helium/helium_script.rb', line 6 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.
4 5 6 |
# File 'lib/helium/helium_script.rb', line 4 def name @name end |
Instance Method Details
#content ⇒ Object
12 13 14 15 |
# File 'lib/helium/helium_script.rb', line 12 def content @content ||= @client.get(resource_path+'/content', content_type: 'application/octet-stream').body end |