Class: StreamdeckProf::Action
- Inherits:
-
Object
- Object
- StreamdeckProf::Action
- Defined in:
- lib/streamdeck_prof/action.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#files ⇒ Object
Returns the value of attribute files.
Instance Method Summary collapse
-
#initialize(config) ⇒ Action
constructor
A new instance of Action.
- #name ⇒ Object
- #name=(name) ⇒ Object
- #save(storage_path) ⇒ Object
- #settings ⇒ Object
- #settings=(settings) ⇒ Object
- #state ⇒ Object
- #state=(state) ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
- #uuid ⇒ Object
- #uuid=(uuid) ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
7 8 9 |
# File 'lib/streamdeck_prof/action.rb', line 7 def config @config end |
#files ⇒ Object
Returns the value of attribute files.
7 8 9 |
# File 'lib/streamdeck_prof/action.rb', line 7 def files @files end |
Instance Method Details
#name ⇒ Object
22 23 24 |
# File 'lib/streamdeck_prof/action.rb', line 22 def name config["Name"] end |
#name=(name) ⇒ Object
26 27 28 |
# File 'lib/streamdeck_prof/action.rb', line 26 def name=(name) config["Name"] = name end |
#save(storage_path) ⇒ Object
52 53 54 |
# File 'lib/streamdeck_prof/action.rb', line 52 def save(storage_path) files.save(storage_path) end |
#settings ⇒ Object
38 39 40 |
# File 'lib/streamdeck_prof/action.rb', line 38 def settings config["Settings"] end |
#settings=(settings) ⇒ Object
42 43 44 |
# File 'lib/streamdeck_prof/action.rb', line 42 def settings=(settings) config["Settings"] = settings end |
#state ⇒ Object
30 31 32 |
# File 'lib/streamdeck_prof/action.rb', line 30 def state config["State"] end |
#state=(state) ⇒ Object
34 35 36 |
# File 'lib/streamdeck_prof/action.rb', line 34 def state=(state) config["State"] = state end |
#to_hash ⇒ Object Also known as: to_h
46 47 48 |
# File 'lib/streamdeck_prof/action.rb', line 46 def to_hash config end |
#uuid ⇒ Object
14 15 16 |
# File 'lib/streamdeck_prof/action.rb', line 14 def uuid config["UUID"] end |
#uuid=(uuid) ⇒ Object
18 19 20 |
# File 'lib/streamdeck_prof/action.rb', line 18 def uuid=(uuid) config["UUID"] = uuid end |