Class: AMA::Entity::Mapper::Type::BuiltIn::RationalType
- Inherits:
-
AMA::Entity::Mapper::Type
- Object
- AMA::Entity::Mapper::Type
- AMA::Entity::Mapper::Type::BuiltIn::RationalType
- Defined in:
- lib/ama-entity-mapper/type/builtin/rational_type.rb
Overview
Rational type description
Instance Attribute Summary
Attributes inherited from AMA::Entity::Mapper::Type
#attributes, #denormalizer, #enumerator, #factory, #injector, #normalizer, #parameters, #type, #virtual
Instance Method Summary collapse
-
#initialize ⇒ RationalType
constructor
A new instance of RationalType.
Methods inherited from AMA::Entity::Mapper::Type
#==, #attribute!, #eql?, #hash, #instance!, #instance?, #parameter!, #resolve, #resolve_parameter, #resolved!, #resolved?, #to_def, #to_s, #valid!, #valid?, #violations
Methods included from Mixin::HandlerSupport
declare_handler_block_setter, declare_handler_getter, declare_handler_method, declare_handler_setter, declare_namespace_method, included
Methods included from Mixin::Reflection
#install_object_method, #method_object, #object_variable, #object_variable_exists, #object_variables, #set_object_attribute
Methods included from Mixin::Errors
#compliance_error, #mapping_error, #raise_if_internal, #validation_error
Constructor Details
#initialize ⇒ RationalType
Returns a new instance of RationalType.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ama-entity-mapper/type/builtin/rational_type.rb', line 13 def initialize super(Rational) normalizer_block do |entity, *| entity.to_s end define_denormalizer define_factory enumerator_block do |*| ::Enumerator.new { |*| } end injector_block { |*| } end |