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.



10
11
12
13
14
15
16
17
# File 'lib/form_props/inputs/base.rb', line 10

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

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

  super(object_name, method_name, template_object, options)
end

Instance Method Details

#jsonObject



6
7
8
# File 'lib/form_props/inputs/base.rb', line 6

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