Class: Kiva::Comment

Inherits:
Object
  • Object
show all
Includes:
Api, DynamicInitializer
Defined in:
lib/ruby-kiva/comment.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Api

app_id, app_id=, friendly, friendly=, included

Methods included from DynamicInitializer

included

Instance Attribute Details

#authorObject

Returns the value of attribute author.



5
6
7
# File 'lib/ruby-kiva/comment.rb', line 5

def author
  @author
end

#bodyObject

Returns the value of attribute body.



5
6
7
# File 'lib/ruby-kiva/comment.rb', line 5

def body
  @body
end

#dateObject

Returns the value of attribute date.



5
6
7
# File 'lib/ruby-kiva/comment.rb', line 5

def date
  @date
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/ruby-kiva/comment.rb', line 5

def id
  @id
end

#whereaboutsObject

Returns the value of attribute whereabouts.



5
6
7
# File 'lib/ruby-kiva/comment.rb', line 5

def whereabouts
  @whereabouts
end

Class Method Details

.find(params) ⇒ Object



8
9
10
11
12
# File 'lib/ruby-kiva/comment.rb', line 8

def self.find(params)
  if params[:journal_entry_id]
    json_to_paged_array(get("/journal_entries/#{params[:journal_entry_id]}/comments.json", :query => base_options(params)), 'comments', true)
  end
end