Class: Tableficate::Filter::InputRange
- Defined in:
- lib/tableficate/filters/input_range.rb
Instance Attribute Summary collapse
-
#start ⇒ Object
readonly
Returns the value of attribute start.
-
#stop ⇒ Object
readonly
Returns the value of attribute stop.
Attributes inherited from Base
#attrs, #field_name, #label, #label_options, #name, #table, #template
Instance Method Summary collapse
-
#initialize(table, name, options = {}) ⇒ InputRange
constructor
A new instance of InputRange.
Methods inherited from Base
Constructor Details
#initialize(table, name, options = {}) ⇒ InputRange
Returns a new instance of InputRange.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/tableficate/filters/input_range.rb', line 38 def initialize(table, name, = {}) = .delete(:start) || {} = .delete(:stop) || {} super(table, name, ) .reverse_merge!(@attrs) .reverse_merge!(label: self.label, label_options: self.) .reverse_merge!(@attrs) .reverse_merge!(label: self.label, label_options: self.) @start = InputStart.new(table, name, ) @stop = InputStop.new(table, name, ) new_partial = "filters/input_range_#{@attrs[:type]}" @template = new_partial if table.template.lookup_context.exists?(Tableficate::Utils::template_path(table.template, new_partial, table.theme), [], true) end |
Instance Attribute Details
#start ⇒ Object (readonly)
Returns the value of attribute start.
36 37 38 |
# File 'lib/tableficate/filters/input_range.rb', line 36 def start @start end |
#stop ⇒ Object (readonly)
Returns the value of attribute stop.
36 37 38 |
# File 'lib/tableficate/filters/input_range.rb', line 36 def stop @stop end |