Class: HFAM::Payload
- Inherits:
-
Hash
- Object
- Hash
- HFAM::Payload
- Defined in:
- lib/hfam/payload.rb
Instance Method Summary collapse
- #commands ⇒ Object
- #help_message ⇒ Object
- #help_option? ⇒ Boolean
-
#initialize ⇒ Payload
constructor
A new instance of Payload.
- #metadata ⇒ Object
- #metadata=(h) ⇒ Object
Constructor Details
#initialize ⇒ Payload
Returns a new instance of Payload.
4 5 6 7 8 9 |
# File 'lib/hfam/payload.rb', line 4 def initialize super self[:metadata] = Hash.new self[:commands] = Array.new { |value| [:unknown, value] } end |
Instance Method Details
#commands ⇒ Object
27 28 29 |
# File 'lib/hfam/payload.rb', line 27 def commands self[:commands] end |
#help_message ⇒ Object
15 16 17 |
# File 'lib/hfam/payload.rb', line 15 def [:help] end |
#help_option? ⇒ Boolean
11 12 13 |
# File 'lib/hfam/payload.rb', line 11 def help_option? !![:help] end |
#metadata ⇒ Object
19 20 21 |
# File 'lib/hfam/payload.rb', line 19 def self[:metadata] end |
#metadata=(h) ⇒ Object
23 24 25 |
# File 'lib/hfam/payload.rb', line 23 def (h) self[:metadata] = h.dup end |