class Serpscan::SerpscanChildObject
Attributes
parent[RW]
Public Class Methods
all(params = {})
click to toggle source
Calls superclass method
# File lib/serpscan/serpscan_child_object.rb, line 13 def all(params = {}) params.merge!(parent: params[:parent], child: self) super end
create(params = {})
click to toggle source
Calls superclass method
# File lib/serpscan/serpscan_child_object.rb, line 18 def create(params = {}) object = new(params) params.merge!("#{object.parent.object_name}_id" => object.parent.id) if object.parent super end
new(options = {})
click to toggle source
Calls superclass method
# File lib/serpscan/serpscan_child_object.rb, line 5 def initialize(options = {}) dup_options = options.dup @parent = dup_options.delete(:parent) @raw_json = dup_options super end