Class: CoderCompanion::Java::ConstructorDefinition

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/codercompanion/java/java.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



217
218
219
220
221
222
223
224
225
# File 'lib/codercompanion/java/java.rb', line 217

def build
    privacy = ''
    method_text = ''
    elements.each do |e|
        privacy = e.text_value if e.respond_to? :privacy
        method_text = e.text_value if e.respond_to? :method_defined
    end
    return [{:type => 'constructor_definition', :value => method_text.gsub(/[\s]+/, ' '), :privacy => privacy}]
end