Class: Snapit::Script
- Inherits:
-
Object
- Object
- Snapit::Script
- Defined in:
- lib/snapit/script.rb
Instance Attribute Summary collapse
-
#script ⇒ Object
readonly
Returns the value of attribute script.
-
#storage ⇒ Object
readonly
Returns the value of attribute storage.
Instance Method Summary collapse
-
#initialize(path, storage) ⇒ Script
constructor
A new instance of Script.
- #name ⇒ Object
- #urls ⇒ Object
Constructor Details
#initialize(path, storage) ⇒ Script
Returns a new instance of Script.
8 9 10 11 12 |
# File 'lib/snapit/script.rb', line 8 def initialize(path, storage) @script = YAML.load_file(path) storage.set_script_name!(self.name) @storage = storage end |
Instance Attribute Details
#script ⇒ Object (readonly)
Returns the value of attribute script.
5 6 7 |
# File 'lib/snapit/script.rb', line 5 def script @script end |
#storage ⇒ Object (readonly)
Returns the value of attribute storage.
6 7 8 |
# File 'lib/snapit/script.rb', line 6 def storage @storage end |
Instance Method Details
#name ⇒ Object
14 15 16 |
# File 'lib/snapit/script.rb', line 14 def name @script["name"] end |
#urls ⇒ Object
18 19 20 |
# File 'lib/snapit/script.rb', line 18 def urls @script["urls"] end |