Class: Flickr::Node
- Inherits:
-
Object
- Object
- Flickr::Node
- Defined in:
- lib/flickr/node.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(client, name) ⇒ Node
constructor
A new instance of Node.
- #invoke(params = {}) ⇒ Object
- #require_parameters? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(client, name) ⇒ Node
Returns a new instance of Node.
7 8 9 |
# File 'lib/flickr/node.rb', line 7 def initialize(client, name) @client, @name = client, name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'lib/flickr/node.rb', line 5 def client @client end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/flickr/node.rb', line 5 def name @name end |
Instance Method Details
#invoke(params = {}) ⇒ Object
15 16 17 |
# File 'lib/flickr/node.rb', line 15 def invoke(params = {}) client.get(Flickr::REST_PATH, params.merge(:method => name)) end |
#require_parameters? ⇒ Boolean
11 12 13 |
# File 'lib/flickr/node.rb', line 11 def require_parameters? true end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/flickr/node.rb', line 19 def to_s name end |