Module: Bake::Metamodel::ModelElement::ClassModule

Defined in:
lib/bake/model/metamodel.rb,
lib/bake/model/metamodel_ext.rb

Instance Method Summary collapse

Instance Method Details

#file_nameObject



21
22
23
# File 'lib/bake/model/metamodel.rb', line 21

def file_name
  @fname
end

#file_name=(name) ⇒ Object



25
26
27
# File 'lib/bake/model/metamodel.rb', line 25

def file_name=(name)
  @fname = name
end

#fragment_ref=(fref) ⇒ Object



17
18
19
# File 'lib/bake/model/metamodel.rb', line 17

def fragment_ref=(fref)
  @fname = fref.fragment.location
end

#get_project_dirObject



8
9
10
11
12
13
14
# File 'lib/bake/model/metamodel_ext.rb', line 8

def get_project_dir
  comp = self
  while comp.respond_to?"parent"
    comp = comp.parent
  end
  ::File.dirname(comp.file_name)
end

#getConfigObject



16
17
18
19
20
21
22
# File 'lib/bake/model/metamodel_ext.rb', line 16

def getConfig
  comp = self
  while !(BaseConfig_INTERNAL === comp) && comp.respond_to?("parent")
    comp = comp.parent
  end
  return comp
end