class Voom::Presenters::DSL::Components::Select::Option
Attributes
disabled[R]
selected[R]
Public Class Methods
new(**attribs_, &block)
click to toggle source
Calls superclass method
Voom::Presenters::DSL::Components::Base::new
# File lib/voom/presenters/dsl/components/select.rb, line 47 def initialize(**attribs_, &block) super(type: :select_option, **attribs_, &block) @value = self.value(attribs.delete(:value)) @text = self.text(attribs.delete(:text)) @selected = attribs.delete(:selected) @disabled = attribs.delete(:disabled) expand! end
Public Instance Methods
text(text=nil)
click to toggle source
# File lib/voom/presenters/dsl/components/select.rb, line 61 def text(text=nil) return @text if locked? @text = text end
value(value=nil)
click to toggle source
# File lib/voom/presenters/dsl/components/select.rb, line 56 def value(value=nil) return @value if locked? @value = value end