Class: ToQuickform::Rule
Overview
Rule
Instance Method Summary collapse
- #group? ⇒ Boolean
-
#initialize(attributes = {}) ⇒ Rule
constructor
A new instance of Rule.
Constructor Details
#initialize(attributes = {}) ⇒ Rule
Returns a new instance of Rule.
9 10 11 12 13 14 15 16 17 |
# File 'lib/to_quickform/rule.rb', line 9 def initialize(attributes = {}) if attributes.is_a?(Hash) (required_attributes + optional_attributes).each do |key| value = attributes[key] self.send "#{key}=", value end end attr_missing! end |
Instance Method Details
#group? ⇒ Boolean
19 20 21 |
# File 'lib/to_quickform/rule.rb', line 19 def group? group end |