class States::Dsl::ConditionGroup
Public Class Methods
new(type, naming)
click to toggle source
Calls superclass method
States::Dsl::Choice::new
# File lib/states/dsl/condition_group.rb, line 4 def initialize(type, naming) super(naming) @type = type @parts = [] end
Public Instance Methods
serializable_hash()
click to toggle source
Calls superclass method
States::Dsl::Choice#serializable_hash
# File lib/states/dsl/condition_group.rb, line 17 def serializable_hash { @type => @parts.map(&:serializable_hash) }.merge(super) end
variable(path, &block)
click to toggle source
# File lib/states/dsl/condition_group.rb, line 10 def variable(path, &block) c = VariableConditionPart.new(path) c.instance_eval(&block) @parts << c c end