class Declarative::Definitions::Definition
Public Class Methods
new(name, options={})
click to toggle source
# File lib/declarative/definitions.rb, line 4 def initialize(name, options={}) @options = options.dup @options[:name] = name.to_s end
Public Instance Methods
[](name)
click to toggle source
# File lib/declarative/definitions.rb, line 9 def [](name) @options[name] end
merge(hash)
click to toggle source
# File lib/declarative/definitions.rb, line 18 def merge(hash) # TODO: should be called #copy. DeepDup.(@options).merge(hash) end
merge!(hash)
click to toggle source
# File lib/declarative/definitions.rb, line 13 def merge!(hash) # TODO: this should return a new Definition instance. @options.merge!(hash) self end