Module: SchemaOrg::Mixins::NutritionInformation

Includes:
StructuredValue
Included in:
NutritionInformation
Defined in:
lib/schema_org/mixins/nutrition_information.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Thing

#additional_type, #additional_type=, #alternate_name, #alternate_name=, #description, #description=, #disambiguating_description, #disambiguating_description=, #identifier, #identifier=, #image, #image=, #main_entity_of_page, #main_entity_of_page=, #name, #name=, #owner, #owner=, #potential_action, #potential_action=, #same_as, #same_as=, #subject_of, #subject_of=, #url, #url=

Class Method Details

.schema_property_definitionsObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/schema_org/mixins/nutrition_information.rb', line 11

def self.schema_property_definitions
  {
    calories: {
      schema_name: "calories",
      schema_url: "https://schema.org/calories",
      comment_lines: ["The number of calories."].freeze,
      ranges: ["Energy"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    carbohydrate_content: {
      schema_name: "carbohydrateContent",
      schema_url: "https://schema.org/carbohydrateContent",
      comment_lines: ["The number of grams of carbohydrates."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    cholesterol_content: {
      schema_name: "cholesterolContent",
      schema_url: "https://schema.org/cholesterolContent",
      comment_lines: ["The number of milligrams of cholesterol."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    fat_content: {
      schema_name: "fatContent",
      schema_url: "https://schema.org/fatContent",
      comment_lines: ["The number of grams of fat."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    fiber_content: {
      schema_name: "fiberContent",
      schema_url: "https://schema.org/fiberContent",
      comment_lines: ["The number of grams of fiber."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    protein_content: {
      schema_name: "proteinContent",
      schema_url: "https://schema.org/proteinContent",
      comment_lines: ["The number of grams of protein."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    saturated_fat_content: {
      schema_name: "saturatedFatContent",
      schema_url: "https://schema.org/saturatedFatContent",
      comment_lines: ["The number of grams of saturated fat."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    serving_size: {
      schema_name: "servingSize",
      schema_url: "https://schema.org/servingSize",
      comment_lines: ["The serving size, in terms of the number of volume or mass."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    sodium_content: {
      schema_name: "sodiumContent",
      schema_url: "https://schema.org/sodiumContent",
      comment_lines: ["The number of milligrams of sodium."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    sugar_content: {
      schema_name: "sugarContent",
      schema_url: "https://schema.org/sugarContent",
      comment_lines: ["The number of grams of sugar."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    trans_fat_content: {
      schema_name: "transFatContent",
      schema_url: "https://schema.org/transFatContent",
      comment_lines: ["The number of grams of trans fat."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    unsaturated_fat_content: {
      schema_name: "unsaturatedFatContent",
      schema_url: "https://schema.org/unsaturatedFatContent",
      comment_lines: ["The number of grams of unsaturated fat."].freeze,
      ranges: ["Mass"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#caloriesObject

The number of calories.



137
138
139
# File 'lib/schema_org/mixins/nutrition_information.rb', line 137

def calories
  read_property(:calories)
end

#calories=(value) ⇒ Object

The number of calories.



142
143
144
# File 'lib/schema_org/mixins/nutrition_information.rb', line 142

def calories=(value)
  write_property(:calories, value)
end

#carbohydrate_contentObject

The number of grams of carbohydrates.



147
148
149
# File 'lib/schema_org/mixins/nutrition_information.rb', line 147

def carbohydrate_content
  read_property(:carbohydrate_content)
end

#carbohydrate_content=(value) ⇒ Object

The number of grams of carbohydrates.



152
153
154
# File 'lib/schema_org/mixins/nutrition_information.rb', line 152

def carbohydrate_content=(value)
  write_property(:carbohydrate_content, value)
end

#cholesterol_contentObject

The number of milligrams of cholesterol.



157
158
159
# File 'lib/schema_org/mixins/nutrition_information.rb', line 157

def cholesterol_content
  read_property(:cholesterol_content)
end

#cholesterol_content=(value) ⇒ Object

The number of milligrams of cholesterol.



162
163
164
# File 'lib/schema_org/mixins/nutrition_information.rb', line 162

def cholesterol_content=(value)
  write_property(:cholesterol_content, value)
end

#fat_contentObject

The number of grams of fat.



167
168
169
# File 'lib/schema_org/mixins/nutrition_information.rb', line 167

def fat_content
  read_property(:fat_content)
end

#fat_content=(value) ⇒ Object

The number of grams of fat.



172
173
174
# File 'lib/schema_org/mixins/nutrition_information.rb', line 172

def fat_content=(value)
  write_property(:fat_content, value)
end

#fiber_contentObject

The number of grams of fiber.



177
178
179
# File 'lib/schema_org/mixins/nutrition_information.rb', line 177

def fiber_content
  read_property(:fiber_content)
end

#fiber_content=(value) ⇒ Object

The number of grams of fiber.



182
183
184
# File 'lib/schema_org/mixins/nutrition_information.rb', line 182

def fiber_content=(value)
  write_property(:fiber_content, value)
end

#protein_contentObject

The number of grams of protein.



187
188
189
# File 'lib/schema_org/mixins/nutrition_information.rb', line 187

def protein_content
  read_property(:protein_content)
end

#protein_content=(value) ⇒ Object

The number of grams of protein.



192
193
194
# File 'lib/schema_org/mixins/nutrition_information.rb', line 192

def protein_content=(value)
  write_property(:protein_content, value)
end

#saturated_fat_contentObject

The number of grams of saturated fat.



197
198
199
# File 'lib/schema_org/mixins/nutrition_information.rb', line 197

def saturated_fat_content
  read_property(:saturated_fat_content)
end

#saturated_fat_content=(value) ⇒ Object

The number of grams of saturated fat.



202
203
204
# File 'lib/schema_org/mixins/nutrition_information.rb', line 202

def saturated_fat_content=(value)
  write_property(:saturated_fat_content, value)
end

#serving_sizeObject

The serving size, in terms of the number of volume or mass.



207
208
209
# File 'lib/schema_org/mixins/nutrition_information.rb', line 207

def serving_size
  read_property(:serving_size)
end

#serving_size=(value) ⇒ Object

The serving size, in terms of the number of volume or mass.



212
213
214
# File 'lib/schema_org/mixins/nutrition_information.rb', line 212

def serving_size=(value)
  write_property(:serving_size, value)
end

#sodium_contentObject

The number of milligrams of sodium.



217
218
219
# File 'lib/schema_org/mixins/nutrition_information.rb', line 217

def sodium_content
  read_property(:sodium_content)
end

#sodium_content=(value) ⇒ Object

The number of milligrams of sodium.



222
223
224
# File 'lib/schema_org/mixins/nutrition_information.rb', line 222

def sodium_content=(value)
  write_property(:sodium_content, value)
end

#sugar_contentObject

The number of grams of sugar.



227
228
229
# File 'lib/schema_org/mixins/nutrition_information.rb', line 227

def sugar_content
  read_property(:sugar_content)
end

#sugar_content=(value) ⇒ Object

The number of grams of sugar.



232
233
234
# File 'lib/schema_org/mixins/nutrition_information.rb', line 232

def sugar_content=(value)
  write_property(:sugar_content, value)
end

#trans_fat_contentObject

The number of grams of trans fat.



237
238
239
# File 'lib/schema_org/mixins/nutrition_information.rb', line 237

def trans_fat_content
  read_property(:trans_fat_content)
end

#trans_fat_content=(value) ⇒ Object

The number of grams of trans fat.



242
243
244
# File 'lib/schema_org/mixins/nutrition_information.rb', line 242

def trans_fat_content=(value)
  write_property(:trans_fat_content, value)
end

#unsaturated_fat_contentObject

The number of grams of unsaturated fat.



247
248
249
# File 'lib/schema_org/mixins/nutrition_information.rb', line 247

def unsaturated_fat_content
  read_property(:unsaturated_fat_content)
end

#unsaturated_fat_content=(value) ⇒ Object

The number of grams of unsaturated fat.



252
253
254
# File 'lib/schema_org/mixins/nutrition_information.rb', line 252

def unsaturated_fat_content=(value)
  write_property(:unsaturated_fat_content, value)
end