Class: Tcepsni::Vendor::ActiveSupport::OrderedOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/tcepsni/vendor/activesupport/ordered_options.rb

Class Method Summary collapse

Class Method Details

.dependenciesObject



21
22
23
# File 'lib/tcepsni/vendor/activesupport/ordered_options.rb', line 21

def self.dependencies
  []
end

.object?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/tcepsni/vendor/activesupport/ordered_options.rb', line 25

def self.object?
  true
end

.parse(parser) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/tcepsni/vendor/activesupport/ordered_options.rb', line 7

def self.parse(parser)
  pos = parser.pos
  parser.skip('ActiveSupport::OrderedOptions ') and
    hash = parser.parse_hash                    and
    parser.skip('>') or
    begin
      parser.pos = pos
      return
    end
  options = ::ActiveSupport::OrderedOptions.new
  hash.each { |key, val| options[key] = val }
  options
end