Class: FeatureToggle::Syntax::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/feature_toggle/syntax.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.run(block) ⇒ Object



11
12
13
# File 'lib/feature_toggle/syntax.rb', line 11

def self.run(block)
  new.instance_eval(&block)
end

Instance Method Details

#feature(name, &block) ⇒ Object



15
16
17
# File 'lib/feature_toggle/syntax.rb', line 15

def feature(name, &block)
  self.features << Feature.new(name, block)
end

#state(name, &block) ⇒ Object



19
20
21
# File 'lib/feature_toggle/syntax.rb', line 19

def state(name, &block)
  self.states << State.new(name, block)
end