Class: LivingStyleGuide::Commands
- Inherits:
-
Object
- Object
- LivingStyleGuide::Commands
- Defined in:
- lib/livingstyleguide/commands.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
Class Method Summary collapse
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(doc) ⇒ Commands
constructor
A new instance of Commands.
Constructor Details
#initialize(doc) ⇒ Commands
Returns a new instance of Commands.
4 5 6 |
# File 'lib/livingstyleguide/commands.rb', line 4 def initialize(doc) @document = doc end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
2 3 4 |
# File 'lib/livingstyleguide/commands.rb', line 2 def document @document end |
Class Method Details
.command(*keys, &block) ⇒ Object
12 13 14 15 16 |
# File 'lib/livingstyleguide/commands.rb', line 12 def self.command(*keys, &block) keys.each do |key| define_method key, &block end end |
Instance Method Details
#get_binding ⇒ Object
8 9 10 |
# File 'lib/livingstyleguide/commands.rb', line 8 def get_binding binding end |