Class: Slotify::ValueOptions
- Inherits:
-
ActiveSupport::OrderedOptions
- Object
- ActiveSupport::OrderedOptions
- Slotify::ValueOptions
- Defined in:
- lib/slotify/value_options.rb
Instance Method Summary collapse
- #except ⇒ Object
-
#initialize(view_context, options = {}) ⇒ ValueOptions
constructor
A new instance of ValueOptions.
- #slice ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(view_context, options = {}) ⇒ ValueOptions
Returns a new instance of ValueOptions.
3 4 5 6 |
# File 'lib/slotify/value_options.rb', line 3 def initialize(view_context, = {}) @view_context = view_context merge!() end |
Instance Method Details
#except ⇒ Object
8 9 10 |
# File 'lib/slotify/value_options.rb', line 8 def except(...) ValueOptions.new(@view_context, to_h.except(...)) end |
#slice ⇒ Object
12 13 14 |
# File 'lib/slotify/value_options.rb', line 12 def slice(...) ValueOptions.new(@view_context, to_h.slice(...)) end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/slotify/value_options.rb', line 16 def to_s @view_context.tag.attributes(self) end |