Class: Helium::Package
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Package
constructor
A new instance of Package.
-
#libraries ⇒ Object
Libraries are immutable and can be cached.
-
#script ⇒ Object
Script is immutable and can be cached.
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 = {}) ⇒ Package
Returns a new instance of Package.
36 37 38 39 |
# File 'lib/helium/helium_script.rb', line 36 def initialize(opts = {}) super(opts) @name = @params.dig('attributes', 'name') end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
34 35 36 |
# File 'lib/helium/helium_script.rb', line 34 def name @name end |
Instance Method Details
#libraries ⇒ Object
Libraries are immutable and can be cached
48 49 50 51 |
# File 'lib/helium/helium_script.rb', line 48 def libraries @libs ||= Collection.new(klass: Library, client: @client, belongs_to: self) end |
#script ⇒ Object
Script is immutable and can be cached
42 43 44 45 |
# File 'lib/helium/helium_script.rb', line 42 def script @script ||= Script.initialize_from_path(path: "#{resource_path}/script", client: @client) end |