Class: ActivityStreams::Verb

Inherits:
Base
  • Object
show all
Defined in:
lib/activitystreams/verb.rb

Instance Method Summary collapse

Methods inherited from Base

#validate_attributes!

Methods included from Validator

#to_integer, #to_iri, #to_time, #validate_attribute!

Constructor Details

#initialize(attributes = {}) ⇒ Verb

Returns a new instance of Verb.



5
6
7
8
# File 'lib/activitystreams/verb.rb', line 5

def initialize(attributes = {})
  attributes[:verb] ||= :post
  super
end

Instance Method Details

#as_json(options = {}) ⇒ Object



10
11
12
# File 'lib/activitystreams/verb.rb', line 10

def as_json(options = {})
  verb.to_s
end