Class: Relish::Commands::Handle

Inherits:
Object
  • Object
show all
Defined in:
lib/relish/commands/handle.rb

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Handle

Returns a new instance of Handle.



4
5
6
# File 'lib/relish/commands/handle.rb', line 4

def initialize(string)
  @project_id, @publisher_id = *string.split('/').reverse
end

Instance Method Details

#resource_urlObject



8
9
10
11
12
# File 'lib/relish/commands/handle.rb', line 8

def resource_url
  result = "projects/#{@project_id}"
  result << "?publisher_id=#{@publisher_id}" if @publisher_id
  result
end