Class: Fleakr::Api::Parameter
- Inherits:
-
Object
- Object
- Fleakr::Api::Parameter
- Defined in:
- lib/fleakr/api/parameter.rb
Overview
Parameter
Base class for other parameters that get passed to the Flickr API - see #FileParameter and #ValueParameter for examples
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
Used for sorting when generating a signature.
-
#include_in_signature? ⇒ Boolean
Should this parameter be used when generating the signature?.
-
#initialize(name, include_in_signature = true) ⇒ Parameter
constructor
A new named parameter (never used directly).
Constructor Details
#initialize(name, include_in_signature = true) ⇒ Parameter
A new named parameter (never used directly)
15 16 17 18 |
# File 'lib/fleakr/api/parameter.rb', line 15 def initialize(name, include_in_signature = true) @name = name @include_in_signature = include_in_signature end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/fleakr/api/parameter.rb', line 11 def name @name end |
Instance Method Details
#<=>(other) ⇒ Object
Used for sorting when generating a signature
28 29 30 |
# File 'lib/fleakr/api/parameter.rb', line 28 def <=>(other) self.name <=> other.name end |
#include_in_signature? ⇒ Boolean
Should this parameter be used when generating the signature?
22 23 24 |
# File 'lib/fleakr/api/parameter.rb', line 22 def include_in_signature? (@include_in_signature == true) ? true : false end |