Class: Detour::DefinedGroup
- Inherits:
-
Object
- Object
- Detour::DefinedGroup
- Defined in:
- app/models/detour/defined_group.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #id)
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, test) ⇒ DefinedGroup
constructor
A new instance of DefinedGroup.
- #test(arg) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name, test) ⇒ DefinedGroup
Returns a new instance of DefinedGroup.
5 6 7 8 |
# File 'app/models/detour/defined_group.rb', line 5 def initialize(name, test) @name = name.to_s @test = test end |
Instance Attribute Details
#name ⇒ Object (readonly) Also known as: id
Returns the value of attribute name.
2 3 4 |
# File 'app/models/detour/defined_group.rb', line 2 def name @name end |
Class Method Details
Instance Method Details
#test(arg) ⇒ Object
14 15 16 |
# File 'app/models/detour/defined_group.rb', line 14 def test(arg) @test.call(arg) end |
#to_s ⇒ Object
10 11 12 |
# File 'app/models/detour/defined_group.rb', line 10 def to_s name end |