Class: Relish::Commands::Handle
- Inherits:
-
Object
- Object
- Relish::Commands::Handle
- Defined in:
- lib/relish/commands/handle.rb
Instance Method Summary collapse
-
#initialize(string) ⇒ Handle
constructor
A new instance of Handle.
- #resource_url ⇒ Object
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_url ⇒ Object
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 |