Class: ToQuickform::Rule

Inherits:
Base
  • Object
show all
Defined in:
lib/to_quickform/rule.rb

Overview

Rule

Instance Method Summary collapse

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

Returns:

  • (Boolean)


19
20
21
# File 'lib/to_quickform/rule.rb', line 19

def group?
  group
end