Class: FormProps::Inputs::Base

Inherits:
ActionView::Helpers::Tags::Base
  • Object
show all
Defined in:
lib/form_props/inputs/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(object_name, method_name, template_object, options = {}) ⇒ Base

Returns a new instance of Base.



16
17
18
19
20
21
22
23
# File 'lib/form_props/inputs/base.rb', line 16

def initialize(object_name, method_name, template_object, options = {})
  options = options.with_indifferent_access

  @controlled = options.delete(:controlled)
  @key = options.delete(:key)

  super
end

Instance Method Details

#jsonObject



12
13
14
# File 'lib/form_props/inputs/base.rb', line 12

def json
  @json ||= @template_object.instance_variable_get(:@__json)
end