Class: Luruju::JudeMeta::JudeInterface

Inherits:
Object
  • Object
show all
Defined in:
lib/luruju/jude_meta.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeJudeInterface

Returns a new instance of JudeInterface.



34
# File 'lib/luruju/jude_meta.rb', line 34

def initialize() @attributes, @super_if_names, @constants = [], [], {} end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



32
33
34
# File 'lib/luruju/jude_meta.rb', line 32

def attributes
  @attributes
end

#constantsObject

Returns the value of attribute constants.



32
33
34
# File 'lib/luruju/jude_meta.rb', line 32

def constants
  @constants
end

#if_nameObject

Returns the value of attribute if_name.



32
33
34
# File 'lib/luruju/jude_meta.rb', line 32

def if_name
  @if_name
end

#super_if_namesObject

Returns the value of attribute super_if_names.



32
33
34
# File 'lib/luruju/jude_meta.rb', line 32

def super_if_names
  @super_if_names
end

Instance Method Details

#class_nameObject



37
# File 'lib/luruju/jude_meta.rb', line 37

def class_name() "Jude#{if_name}" end

#define_for_lurujuObject



39
40
41
42
43
44
# File 'lib/luruju/jude_meta.rb', line 39

def define_for_luruju
  super_ifs.select{|x|!JudeMeta.is_defined_for_luruju?(x.if_name)}.each{|x|x.define_for_luruju}
  JudeApi.module_eval ERB.new(module_erb_def).result(binding)
  JudeApi.module_eval ERB.new(class_erb_def).result(binding)
  JudeApi.module_eval class_name
end

#module_nameObject



36
# File 'lib/luruju/jude_meta.rb', line 36

def module_name() "Jude#{if_name}Methods" end

#super_ifsObject



35
# File 'lib/luruju/jude_meta.rb', line 35

def super_ifs() @super_if_names.collect{|x|JudeMeta.instance.interfaces[x]} end