Class: LivingStyleGuide::Commands

Inherits:
Object
  • Object
show all
Defined in:
lib/livingstyleguide/commands.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#documentObject (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_bindingObject



8
9
10
# File 'lib/livingstyleguide/commands.rb', line 8

def get_binding
  binding
end