class PortaText::Command::Api::Templates

The templates endpoint. github.com/PortaText/docs/wiki/REST-API#api_templates

Author

Marcelo Gornstein (marcelog@portatext.com)

Copyright

Copyright © 2015 PortaText

License

Apache-2.0

Public Instance Methods

description(description) click to toggle source
# File lib/portatext/command/api/templates.rb, line 19
def description(description)
  set :description, description
end
endpoint(_method) click to toggle source
# File lib/portatext/command/api/templates.rb, line 27
def endpoint(_method)
  return 'templates' if @args[:id].nil?
  id = @args[:id]
  @args.delete :id
  "templates/#{id}"
end
id(id) click to toggle source
# File lib/portatext/command/api/templates.rb, line 11
def id(id)
  set :id, id
end
name(name) click to toggle source
# File lib/portatext/command/api/templates.rb, line 15
def name(name)
  set :name, name
end
text(text) click to toggle source
# File lib/portatext/command/api/templates.rb, line 23
def text(text)
  set :text, text
end