Class: WinewooCore::Models::NewsEntry
- Inherits:
-
Object
- Object
- WinewooCore::Models::NewsEntry
- Defined in:
- lib/winewoo_core/models/news_entry.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#media ⇒ Object
Returns the value of attribute media.
-
#text ⇒ Object
Returns the value of attribute text.
-
#type ⇒ Object
Returns the value of attribute type.
-
#user ⇒ Object
Returns the value of attribute user.
-
#vintage_id ⇒ Object
Returns the value of attribute vintage_id.
-
#vintage_title ⇒ Object
Returns the value of attribute vintage_title.
-
#wine_id ⇒ Object
Returns the value of attribute wine_id.
-
#wine_name ⇒ Object
Returns the value of attribute wine_name.
Instance Method Summary collapse
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/winewoo_core/models/news_entry.rb', line 7 def created_at @created_at end |
#media ⇒ Object
Returns the value of attribute media.
6 7 8 |
# File 'lib/winewoo_core/models/news_entry.rb', line 6 def media @media end |
#text ⇒ Object
Returns the value of attribute text.
5 6 7 |
# File 'lib/winewoo_core/models/news_entry.rb', line 5 def text @text end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/winewoo_core/models/news_entry.rb', line 4 def type @type end |
#user ⇒ Object
Returns the value of attribute user.
12 13 14 |
# File 'lib/winewoo_core/models/news_entry.rb', line 12 def user @user end |
#vintage_id ⇒ Object
Returns the value of attribute vintage_id.
10 11 12 |
# File 'lib/winewoo_core/models/news_entry.rb', line 10 def vintage_id @vintage_id end |
#vintage_title ⇒ Object
Returns the value of attribute vintage_title.
11 12 13 |
# File 'lib/winewoo_core/models/news_entry.rb', line 11 def vintage_title @vintage_title end |
#wine_id ⇒ Object
Returns the value of attribute wine_id.
8 9 10 |
# File 'lib/winewoo_core/models/news_entry.rb', line 8 def wine_id @wine_id end |
#wine_name ⇒ Object
Returns the value of attribute wine_name.
9 10 11 |
# File 'lib/winewoo_core/models/news_entry.rb', line 9 def wine_name @wine_name end |
Instance Method Details
#to_h ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/winewoo_core/models/news_entry.rb', line 15 def to_h hash = {} instance_variables.each do |var| hash[var.to_s.delete("@")] = instance_variable_get(var) end return hash end |