class Yandex::Disk::Client::Request::Publication
Constants
- BODY
- HEADERS
Public Class Methods
new(http, path)
click to toggle source
# File lib/yandex/disk/client/request/publication.rb, line 15 def initialize http, path @http = http @path = path end
Public Instance Methods
perform()
click to toggle source
# File lib/yandex/disk/client/request/publication.rb, line 20 def perform response = @http.run_request :proppatch, @path, BODY, HEADERS parse_result = parse(response.body) { :public_url => parse_result.public_url } end
Private Instance Methods
parse(body)
click to toggle source
# File lib/yandex/disk/client/request/publication.rb, line 43 def parse body attributes_parser = AttributesParser.new parser = Nokogiri::XML::SAX::Parser.new(attributes_parser) parser.parse(body) attributes_parser end