Class: Martin::DSL::Command

Inherits:
Method show all
Defined in:
lib/martin/dsl.rb

Instance Attribute Summary collapse

Attributes inherited from Method

#block

Instance Method Summary collapse

Constructor Details

#initialize(regexp, block) ⇒ Command

Returns a new instance of Command.



23
24
25
26
27
# File 'lib/martin/dsl.rb', line 23

def initialize(regexp, block)
    super(block)
    regexp.should_be_a(Regexp)
    @regexp = regexp
end

Instance Attribute Details

#regexpObject

Returns the value of attribute regexp.



22
23
24
# File 'lib/martin/dsl.rb', line 22

def regexp
  @regexp
end