Class: Rancher::Arguments
- Inherits:
-
Array
- Object
- Array
- Rancher::Arguments
- Defined in:
- lib/rancher/arguments.rb
Overview
Extracts options from method arguments
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(args) ⇒ Arguments
constructor
A new instance of Arguments.
Constructor Details
#initialize(args) ⇒ Arguments
Returns a new instance of Arguments.
7 8 9 10 |
# File 'lib/rancher/arguments.rb', line 7 def initialize(args) @options = args.last.is_a?(::Hash) ? args.pop : {} super(args) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/rancher/arguments.rb', line 5 def @options end |