Class: Luruju::JudeMeta::JudeInterface
- Inherits:
-
Object
- Object
- Luruju::JudeMeta::JudeInterface
- Defined in:
- lib/luruju/jude_meta.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#constants ⇒ Object
Returns the value of attribute constants.
-
#if_name ⇒ Object
Returns the value of attribute if_name.
-
#super_if_names ⇒ Object
Returns the value of attribute super_if_names.
Instance Method Summary collapse
- #class_name ⇒ Object
- #define_for_luruju ⇒ Object
-
#initialize ⇒ JudeInterface
constructor
A new instance of JudeInterface.
- #module_name ⇒ Object
- #super_ifs ⇒ Object
Constructor Details
#initialize ⇒ JudeInterface
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
#attributes ⇒ Object
Returns the value of attribute attributes.
32 33 34 |
# File 'lib/luruju/jude_meta.rb', line 32 def attributes @attributes end |
#constants ⇒ Object
Returns the value of attribute constants.
32 33 34 |
# File 'lib/luruju/jude_meta.rb', line 32 def constants @constants end |
#if_name ⇒ Object
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_names ⇒ Object
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_name ⇒ Object
37 |
# File 'lib/luruju/jude_meta.rb', line 37 def class_name() "Jude#{if_name}" end |
#define_for_luruju ⇒ Object
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_name ⇒ Object
36 |
# File 'lib/luruju/jude_meta.rb', line 36 def module_name() "Jude#{if_name}Methods" end |
#super_ifs ⇒ Object
35 |
# File 'lib/luruju/jude_meta.rb', line 35 def super_ifs() @super_if_names.collect{|x|JudeMeta.instance.interfaces[x]} end |