lib/abstract_mapper/settings.rb in abstract_mapper-0.0.1 vs lib/abstract_mapper/settings.rb in abstract_mapper-0.0.2
- old
+ new
@@ -50,24 +50,24 @@
__set_rules__
__set_commands__
__configure__(&block)
__set_builder__
__set_optimizer__
- freeze
+ IceNine.deep_freeze(self)
end
private
def rule(value)
fn = Functions[:subclass?, Rule]
fail Errors::WrongRule.new(value) unless fn[value]
@rules = rules << value
end
- def command(name, node)
+ def command(name, node, &block)
fn = Functions[:subclass?, Node]
fail Errors::WrongNode.new(node) unless fn[node]
- @commands = commands << [name, node]
+ @commands = commands << [name, node, block]
end
def __set_rules__
@rules = Rules.new
end