Class: Logsaber::Options
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Logsaber::Options
- Defined in:
- lib/logsaber/options.rb
Class Method Summary collapse
Instance Method Summary collapse
- #to_a ⇒ Object (also: #to_ary)
Class Method Details
.extract_from(args, defaults = {}, primary = nil) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/logsaber/options.rb', line 5 def self.extract_from args, defaults = {}, primary = nil = args.last.is_a?(Hash) ? args.pop : Hash.new [primary] = args.shift if primary && args.first new defaults.merge() end |
Instance Method Details
#to_a ⇒ Object Also known as: to_ary
12 13 14 |
# File 'lib/logsaber/options.rb', line 12 def to_a @table.values end |