Class: Lotus::Helpers::FormHelper::Values

Inherits:
Object
  • Object
show all
Defined in:
lib/lotus/helpers/form_helper/values.rb

Overview

Since:

  • 0.2.0

Constant Summary collapse

GET_SEPARATOR =

Since:

  • 0.2.0

'.'.freeze

Instance Method Summary collapse

Constructor Details

#initialize(values, params) ⇒ Values

Returns a new instance of Values.

Since:

  • 0.2.0


9
10
11
12
# File 'lib/lotus/helpers/form_helper/values.rb', line 9

def initialize(values, params)
  @values = Utils::Hash.new(values).stringify!
  @params = params
end

Instance Method Details

#get(key) ⇒ Object

Since:

  • 0.2.0


14
15
16
# File 'lib/lotus/helpers/form_helper/values.rb', line 14

def get(key)
  @params.get(key) || _get_from_values(key)
end