Class: Vzaar::Request::Base
- Inherits:
-
Struct
- Object
- Struct
- Vzaar::Request::Base
- Includes:
- Helper
- Defined in:
- lib/vzaar/request/base.rb
Direct Known Subclasses
AccountType, AddSubtitle, LinkUpload, ProcessVideo, Signature, UploadStatus, UserDetails, Video, VideoList, WhoAmI
Instance Attribute Summary collapse
-
#conn ⇒ Object
Returns the value of attribute conn.
-
#opts ⇒ Object
Returns the value of attribute opts.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Helper
#blank?, #hash_to_xml, #symb_keys
Instance Attribute Details
#conn ⇒ Object
Returns the value of attribute conn
3 4 5 |
# File 'lib/vzaar/request/base.rb', line 3 def conn @conn end |
#opts ⇒ Object
Returns the value of attribute opts
3 4 5 |
# File 'lib/vzaar/request/base.rb', line 3 def opts @opts end |
Class Method Details
.endpoint(obj = nil, &fn) ⇒ Object
16 17 18 |
# File 'lib/vzaar/request/base.rb', line 16 def endpoint(obj=nil, &fn) define_method(:endpoint) { block_given? ? yield(self) : obj } end |
.format(f) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/vzaar/request/base.rb', line 24 def format(f) define_method(:format) do # JC: options should always overwrite format param self.[:format] ? self.[:format] : f end end |
.resource(name) ⇒ Object
20 21 22 |
# File 'lib/vzaar/request/base.rb', line 20 def resource(name) define_method(:resource) { name } end |