Class: ActivePublicResources::ReturnTypes::BaseReturnType

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Serialization
Defined in:
lib/active_public_resources/base_return_type.rb

Direct Known Subclasses

File, Iframe, ImageUrl, Oembed, Url

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ BaseReturnType

Returns a new instance of BaseReturnType.



8
9
10
11
12
# File 'lib/active_public_resources/base_return_type.rb', line 8

def initialize(args)
  args.each do |k,v|
    instance_variable_set("@#{k}", v) unless v.nil?
  end
end

Instance Attribute Details

#driverObject

Returns the value of attribute driver.



6
7
8
# File 'lib/active_public_resources/base_return_type.rb', line 6

def driver
  @driver
end

#remote_idObject

Returns the value of attribute remote_id.



6
7
8
# File 'lib/active_public_resources/base_return_type.rb', line 6

def remote_id
  @remote_id
end

#return_typeObject

Returns the value of attribute return_type.



6
7
8
# File 'lib/active_public_resources/base_return_type.rb', line 6

def return_type
  @return_type
end

#urlObject

Returns the value of attribute url.



6
7
8
# File 'lib/active_public_resources/base_return_type.rb', line 6

def url
  @url
end

Instance Method Details

#attributesObject



14
15
16
# File 'lib/active_public_resources/base_return_type.rb', line 14

def attributes
  instance_values
end