Class: WinewooCore::Models::NewsEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/winewoo_core/models/news_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#created_atObject

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

#mediaObject

Returns the value of attribute media.



6
7
8
# File 'lib/winewoo_core/models/news_entry.rb', line 6

def media
  @media
end

#textObject

Returns the value of attribute text.



5
6
7
# File 'lib/winewoo_core/models/news_entry.rb', line 5

def text
  @text
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/winewoo_core/models/news_entry.rb', line 4

def type
  @type
end

#userObject

Returns the value of attribute user.



12
13
14
# File 'lib/winewoo_core/models/news_entry.rb', line 12

def user
  @user
end

#vintage_idObject

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_titleObject

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_idObject

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_nameObject

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_hObject



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