Class: Mappum::DSL::RootMap

Inherits:
Map show all
Defined in:
lib/mappum/dsl.rb

Instance Attribute Summary

Attributes inherited from Map

#def

Instance Method Summary collapse

Methods inherited from Map

#`, #const, #context, #func, #map, #map_when, #name_map, #name_map_prefix, #to_array_take, #tree

Constructor Details

#initialize(name, source = nil) ⇒ RootMap

Returns a new instance of RootMap.



141
142
143
144
# File 'lib/mappum/dsl.rb', line 141

def initialize(name,source=nil)
  @def = Mappum::RootMap.new(name)
  @def.source = source
end

Instance Method Details

#make_definition(&block) ⇒ Object



145
146
147
148
# File 'lib/mappum/dsl.rb', line 145

def make_definition &block
  instance_eval(&block)
  @def
end