class Abt::Providers::Asana::Path
Constants
- PATH_REGEX
Public Class Methods
from_gids(project_gid: nil, task_gid: nil)
click to toggle source
# File lib/abt/providers/asana/path.rb, line 9 def self.from_gids(project_gid: nil, task_gid: nil) path = project_gid ? [project_gid, *task_gid].join("/") : "" new(path) end
new(path = "")
click to toggle source
Calls superclass method
# File lib/abt/providers/asana/path.rb, line 14 def initialize(path = "") raise Abt::Cli::Abort, "Invalid path: #{path}" unless PATH_REGEX.match?(path) super end
Public Instance Methods
project_gid()
click to toggle source
# File lib/abt/providers/asana/path.rb, line 20 def project_gid match[:project_gid] end
task_gid()
click to toggle source
# File lib/abt/providers/asana/path.rb, line 24 def task_gid match[:task_gid] end
Private Instance Methods
match()
click to toggle source
# File lib/abt/providers/asana/path.rb, line 30 def match @match ||= PATH_REGEX.match(to_s) end