Class: Automatic::OPML::DOM::Outline

Inherits:
Element
  • Object
show all
Defined in:
lib/automatic/opml.rb

Instance Attribute Summary

Attributes inherited from Element

#attr, #children, #parent

Instance Method Summary collapse

Methods inherited from Element

#<<, #[], #[]=, #each, #initialize, #is_breaakpoint?, #is_comment?, #text, #type

Constructor Details

This class inherits a constructor from Automatic::OPML::DOM::Element

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *arg, &block) ⇒ Object



111
112
113
114
115
116
117
118
119
120
# File 'lib/automatic/opml.rb', line 111

def method_missing(name,*arg,&block)
  name = name.to_s
  case name
  when /^[a-z][0-9a-zA-Z_]*$/
    key = name.gsub(/_([a-z])/) {|x| ".#{$1.upcase}" }
    @attr[key]
  else
    raise NoMethodError
  end
end