Class: Todo::Src::Idonthis

Inherits:
Struct
  • Object
show all
Defined in:
lib/todo/src/idonethis.rb

Constant Summary collapse

URL =
'https://idonethis.com/api/v0.1/dones/'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config

Returns:

  • (Object)

    the current value of config



6
7
8
# File 'lib/todo/src/idonethis.rb', line 6

def config
  @config
end

#optsObject

Returns the value of attribute opts

Returns:

  • (Object)

    the current value of opts



6
7
8
# File 'lib/todo/src/idonethis.rb', line 6

def opts
  @opts
end

Instance Method Details

#include?(item) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/todo/src/idonethis.rb', line 9

def include?(item)
  texts.include?(item.text) or ids.include?(item.id)
end

#write(lines) ⇒ Object



13
14
15
# File 'lib/todo/src/idonethis.rb', line 13

def write(lines)
  lines.each { |line| post(line) }
end