Class: SimpleFeed::DSL::Activities
- Inherits:
-
Object
- Object
- SimpleFeed::DSL::Activities
- Includes:
- Formatter
- Defined in:
- lib/simplefeed/dsl/activities.rb
Instance Attribute Summary collapse
-
#activity ⇒ Object
Returns the value of attribute activity.
-
#feed ⇒ Object
Returns the value of attribute feed.
Instance Method Summary collapse
-
#initialize(activity, **opts) ⇒ Activities
constructor
A new instance of Activities.
Methods included from Formatter
#color_dump, #print_last_read_separator
Methods included from SimpleFeed::DSL
#_puts, debug?, #event, #feed_header, #field, #field_label, #field_value, #header, #hr, #hr_string, #output, #width, #with_activity
Constructor Details
#initialize(activity, **opts) ⇒ Activities
Returns a new instance of Activities.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/simplefeed/dsl/activities.rb', line 11 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 send("#{key}=".to_sym, value) end end |
Instance Attribute Details
#activity ⇒ Object
Returns the value of attribute activity.
9 10 11 |
# File 'lib/simplefeed/dsl/activities.rb', line 9 def activity @activity end |
#feed ⇒ Object
Returns the value of attribute feed.
9 10 11 |
# File 'lib/simplefeed/dsl/activities.rb', line 9 def feed @feed end |