Class: IcAgent::Ast::Nodes::IcServiceItem

Inherits:
NamedNode
  • Object
show all
Defined in:
lib/ic_agent/ast/nodes/named_nodes.rb

Instance Method Summary collapse

Methods inherited from NamedNode

#elements_to_s, #source_content, #to_array

Instance Method Details

#titleObject



298
299
300
# File 'lib/ic_agent/ast/nodes/named_nodes.rb', line 298

def title
  :ic_service_item
end

#to_objObject



306
307
308
309
310
311
312
# File 'lib/ic_agent/ast/nodes/named_nodes.rb', line 306

def to_obj
  obj = {}
  elements.each do |element|
    obj[element.title.to_s] = element.text_value.gsub("\n", '')
  end
  obj
end

#to_sObject



302
303
304
# File 'lib/ic_agent/ast/nodes/named_nodes.rb', line 302

def to_s
  elements_to_s
end