Class: FedenaSdk::News
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#content ⇒ Object
Returns the value of attribute content.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Model
attr_accessor, #attributes, #attributes_hash, get, #get, #initialize, #post, post, request, #request
Constructor Details
This class inherits a constructor from FedenaSdk::Model
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
3 4 5 |
# File 'lib/fedena_sdk/news.rb', line 3 def @author end |
#content ⇒ Object
Returns the value of attribute content.
3 4 5 |
# File 'lib/fedena_sdk/news.rb', line 3 def content @content end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/fedena_sdk/news.rb', line 3 def title @title end |
Class Method Details
.all(_count = nil) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/fedena_sdk/news.rb', line 4 def self.all(_count = nil) url = '/api/news' hash = get(url) hash['news_detail']['news'].map do |news_hash| new news_hash end end |