Class: ContentItem

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

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ ContentItem

Returns a new instance of ContentItem.



37
38
39
# File 'lib/RssMangler.rb', line 37

def initialize item
  @content = item
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *arg) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/RssMangler.rb', line 41

def method_missing method, *arg
  begin
    @content.send(method).text
  rescue NoMethodError
    ""
  end
end