Class: Foxynews::Clipping

Inherits:
Object
  • Object
show all
Defined in:
app/services/foxynews/clipping.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Clipping

Returns a new instance of Clipping.



3
4
5
6
7
8
9
10
11
12
# File 'app/services/foxynews/clipping.rb', line 3

def initialize(args)
  if args.is_a? Hash
    args.each do |name, value|
      instance_variable_set("@#{name}", value)
      self.class.send(:attr_accessor, name)
    end
  else
    false
  end
end