Class: SimpleFeed::DSL::Activities

Inherits:
Object
  • Object
show all
Includes:
Formatter
Defined in:
lib/simplefeed/dsl/activities.rb

Constant Summary

Constants included from SimpleFeed::DSL

TIME_FORMAT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Formatter

#color_dump, #print_last_read_separator

Methods included from SimpleFeed::DSL

#_hr, #_print, #_puts, debug?, #event, #field, #field_label, #field_value, #header, #hr, #with_activity

Constructor Details

#initialize(activity, **opts) ⇒ Activities

Returns a new instance of Activities.


10
11
12
13
14
15
16
17
18
19
# File 'lib/simplefeed/dsl/activities.rb', line 10

def initialize(activity, **opts)
  self.activity = activity
  self.feed     = activity.feed
  opts.each_pair do |key, value|
    self.class.instance_eval do
      attr_accessor key
    end
    self.send("#{key}=".to_sym, value)
  end
end

Instance Attribute Details

#activityObject

Returns the value of attribute activity


8
9
10
# File 'lib/simplefeed/dsl/activities.rb', line 8

def activity
  @activity
end

#feedObject

Returns the value of attribute feed


8
9
10
# File 'lib/simplefeed/dsl/activities.rb', line 8

def feed
  @feed
end