module Roar::Client
Mix in HttpVerbs
.
Public Class Methods
extended(base)
click to toggle source
Add accessors for properties and collections to modules.
# File lib/roar/client.rb, line 10 def self.extended(base) base.instance_eval do representable_attrs.each do |attr| name = attr.name next if name == "links" # ignore hyperlinks. # TODO: could anyone please make this better? instance_eval %Q{ def #{name}=(v) @#{name} = v end def #{name} @#{name} end } end end end
Public Instance Methods
to_hash(options={})
click to toggle source
Calls superclass method
# File lib/roar/client.rb, line 30 def to_hash(options={}) # options[:links] ||= false options[:user_options] ||= {} options[:user_options][:links] ||= false super(options) end
to_xml(options={})
click to toggle source
Calls superclass method
# File lib/roar/client.rb, line 38 def to_xml(options={}) # sorry, but i'm not even sure if anyone uses this module. options[:user_options] ||= {} options[:user_options][:links] ||= false super(options) end