Class: SeemsRateable::Builder::HtmlOptions
- Inherits:
-
Object
- Object
- SeemsRateable::Builder::HtmlOptions
- Defined in:
- lib/seems_rateable/builder/html_options.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
Instance Method Summary collapse
-
#initialize(rating, options) ⇒ HtmlOptions
constructor
A new instance of HtmlOptions.
- #to_h ⇒ Object
Constructor Details
#initialize(rating, options) ⇒ HtmlOptions
Returns a new instance of HtmlOptions.
6 7 8 |
# File 'lib/seems_rateable/builder/html_options.rb', line 6 def initialize(, ) @rating, @options = , end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/seems_rateable/builder/html_options.rb', line 4 def @options end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
4 5 6 |
# File 'lib/seems_rateable/builder/html_options.rb', line 4 def @rating end |
Instance Method Details
#to_h ⇒ Object
10 11 12 13 14 |
# File 'lib/seems_rateable/builder/html_options.rb', line 10 def to_h [:class] = "#{klass} #{disabled}".strip [:data] = .fetch(:data, {}).merge() end |