Class: OpenCongress::OCBlogPost
- Inherits:
-
OpenCongressObject
- Object
- OpenCongressObject
- OpenCongress::OCBlogPost
- Defined in:
- lib/opencongress/blog_post.rb
Instance Attribute Summary collapse
-
#average_rating ⇒ Object
Returns the value of attribute average_rating.
-
#date ⇒ Object
Returns the value of attribute date.
-
#excerpt ⇒ Object
Returns the value of attribute excerpt.
-
#source ⇒ Object
Returns the value of attribute source.
-
#source_url ⇒ Object
Returns the value of attribute source_url.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(params) ⇒ OCBlogPost
constructor
A new instance of OCBlogPost.
Methods inherited from OpenCongressObject
construct_url, hash2get, make_call, parse_supporting_results
Constructor Details
#initialize(params) ⇒ OCBlogPost
Returns a new instance of OCBlogPost.
9 10 11 12 13 |
# File 'lib/opencongress/blog_post.rb', line 9 def initialize(params) params.each do |key, value| instance_variable_set("@#{key}", value) if OCBlogPost.instance_methods.include? key end end |
Instance Attribute Details
#average_rating ⇒ Object
Returns the value of attribute average_rating.
6 7 8 |
# File 'lib/opencongress/blog_post.rb', line 6 def end |
#date ⇒ Object
Returns the value of attribute date.
6 7 8 |
# File 'lib/opencongress/blog_post.rb', line 6 def date @date end |
#excerpt ⇒ Object
Returns the value of attribute excerpt.
6 7 8 |
# File 'lib/opencongress/blog_post.rb', line 6 def excerpt @excerpt end |
#source ⇒ Object
Returns the value of attribute source.
6 7 8 |
# File 'lib/opencongress/blog_post.rb', line 6 def source @source end |
#source_url ⇒ Object
Returns the value of attribute source_url.
6 7 8 |
# File 'lib/opencongress/blog_post.rb', line 6 def source_url @source_url end |
#title ⇒ Object
Returns the value of attribute title.
6 7 8 |
# File 'lib/opencongress/blog_post.rb', line 6 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/opencongress/blog_post.rb', line 6 def url @url end |