Class: Trelloid::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/trelloid.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



75
76
77
# File 'lib/trelloid.rb', line 75

def name
  @name
end

#procObject (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

Returns:

  • (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