Class: CanTango::Finder::Base
- Inherits:
-
Object
- Object
- CanTango::Finder::Base
- Includes:
- Helpers::Debug
- Defined in:
- lib/cantango/permits_ext/finder/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, options) ⇒ Base
constructor
A new instance of Base.
- #permit ⇒ Object
Constructor Details
#initialize(name, options) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 13 |
# File 'lib/cantango/permits_ext/finder/base.rb', line 8 def initialize name, @name = name.to_s.underscore.to_sym @type = [:type] raise ArgumentError, "Missing name of permit to find" if !name raise ArgumentError, "Missing type of permit to find" if !type end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/cantango/permits_ext/finder/base.rb', line 6 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/cantango/permits_ext/finder/base.rb', line 6 def type @type end |
Instance Method Details
#permit ⇒ Object
15 16 17 18 |
# File 'lib/cantango/permits_ext/finder/base.rb', line 15 def permit debug permit_msg(found_permit) found_permit end |