Class: Trelloid::Task
- Inherits:
-
Object
- Object
- Trelloid::Task
- Defined in:
- lib/trelloid.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#proc ⇒ Object
readonly
Returns the value of attribute proc.
Instance Method Summary collapse
-
#initialize(name, &blk) ⇒ Task
constructor
A new instance of Task.
- #match?(title) ⇒ Boolean
- #process(&blk) ⇒ Object
Constructor Details
#initialize(name, &blk) ⇒ Task
Returns a new instance of Task.
77 78 79 80 |
# File 'lib/trelloid.rb', line 77 def initialize(name, &blk) @name = name instance_eval(&blk) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
75 76 77 |
# File 'lib/trelloid.rb', line 75 def name @name end |
#proc ⇒ Object (readonly)
Returns the value of attribute proc.
75 76 77 |
# File 'lib/trelloid.rb', line 75 def proc @proc end |
Instance Method Details
#match?(title) ⇒ Boolean
86 87 88 |
# File 'lib/trelloid.rb', line 86 def match?(title) !!name.match(title) end |
#process(&blk) ⇒ Object
82 83 84 |
# File 'lib/trelloid.rb', line 82 def process(&blk) @proc = blk end |