Class: SchemaOrg::Mass

Inherits:
Base
  • Object
show all
Includes:
SchemaOrg::Mixins::Mass, _Mass
Defined in:
lib/schema_org/types/mass.rb,
sig/schema_org.rbs

Overview

https://schema.org/Mass

Properties that take Mass as values are of the form '<Number> <Mass unit of measure>'. E.g., '7 kg'.

Constant Summary collapse

SCHEMA_NAME =
"Mass"
SCHEMA_TYPES =
[self, SchemaOrg::Quantity, SchemaOrg::DataType].freeze
ABSTRACT_TYPE =
true

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SchemaOrg::Mixins::Mass

schema_property_definitions

Methods included from SchemaOrg::Mixins::Quantity

schema_property_definitions

Methods included from SchemaOrg::Mixins::DataType

schema_property_definitions

Class Method Details

.new(**properties) ⇒ bot

Parameters:

  • (Object)

Returns:

  • (bot)

Raises:



31
32
33
# File 'lib/schema_org/types/mass.rb', line 31

def new(**properties)
  raise AbstractTypeError, "Mass is an abstract schema type"
end

.schema_nameString

Returns:

  • (String)


18
19
20
# File 'lib/schema_org/types/mass.rb', line 18

def schema_name
  SCHEMA_NAME
end

.schema_type?(other_type) ⇒ Boolean

Parameters:

  • (Object)

Returns:



26
27
28
29
# File 'lib/schema_org/types/mass.rb', line 26

def schema_type?(other_type)
  Base.schema_type_argument!(other_type)
  SCHEMA_TYPES.include?(other_type)
end

.schema_types::Array[::Class]

Returns:

  • (::Array[::Class])


22
23
24
# File 'lib/schema_org/types/mass.rb', line 22

def schema_types
  SCHEMA_TYPES
end

Instance Method Details

#schema_type?Boolean

Parameters:

  • (Object)

Returns:



69672
# File 'sig/schema_org.rbs', line 69672

def schema_type?: (untyped) -> bool

#schema_types::Array[::Class]

Returns:

  • (::Array[::Class])


69671
# File 'sig/schema_org.rbs', line 69671

def schema_types: () -> ::Array[::Class]