Module: Justimmo::Parser::Conversions::Attr

Included in:
Justimmo::Parser
Defined in:
lib/justimmo/parser.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#to_h(hash = {}, mapper = nil) ⇒ Object


98
99
100
101
# File 'lib/justimmo/parser.rb', line 98

def to_h(hash = {}, mapper = nil)
  key = "@#{apply_mapping(format_key(name), mapper)}".to_sym
  hash[key] = apply_mapping(parse_value(value), mapper)
end