Class: Rbuzz::FeedReply

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(atom_entry) ⇒ FeedReply

Expects an Atom::Entry object



6
7
8
# File 'lib/rbuzz/feed_reply.rb', line 6

def initialize(atom_entry)
  @atom_entry = atom_entry
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



14
15
16
# File 'lib/rbuzz/feed_reply.rb', line 14

def method_missing(method, *args, &block)
  @atom_entry.send(method)
end

Instance Attribute Details

#atom_entryObject (readonly)

Returns the value of attribute atom_entry.



3
4
5
# File 'lib/rbuzz/feed_reply.rb', line 3

def atom_entry
  @atom_entry
end

Instance Method Details

#[](name) ⇒ Object



10
11
12
# File 'lib/rbuzz/feed_reply.rb', line 10

def [](name)
  @atom_entry.send(name)
end

#authorObject



18
19
20
# File 'lib/rbuzz/feed_reply.rb', line 18

def author
  @atom_entry.authors[0] if @atom_entry.respond_to?(:authors)
end