Class: Session
- Inherits:
-
Object
- Object
- Session
- Defined in:
- lib/hurl/session.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
- #hurl(cmd) ⇒ Object
-
#initialize(sesh) ⇒ Session
constructor
A new instance of Session.
- #method_missing(command, *args) ⇒ Object
Constructor Details
#initialize(sesh) ⇒ Session
Returns a new instance of Session.
4 5 6 |
# File 'lib/hurl/session.rb', line 4 def initialize(sesh) @session = sesh end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(command, *args) ⇒ Object
8 9 10 11 |
# File 'lib/hurl/session.rb', line 8 def method_missing(command, *args) cmd = command.to_s + args.inject('') do |opts, arg| opts += ' ' + arg.to_s end hurl(cmd) end |
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
2 3 4 |
# File 'lib/hurl/session.rb', line 2 def session @session end |
Instance Method Details
#hurl(cmd) ⇒ Object
13 14 |
# File 'lib/hurl/session.rb', line 13 def hurl(cmd) end |