Class: Contentful::BaseCoercion
- Inherits:
-
Object
- Object
- Contentful::BaseCoercion
- Defined in:
- lib/contentful/coercions.rb
Overview
Basic Coercion
Direct Known Subclasses
ArrayCoercion, BooleanCoercion, DateCoercion, FloatCoercion, IntegerCoercion, LinkCoercion, LocationCoercion, ObjectCoercion, RichTextCoercion, StringCoercion
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#coerce ⇒ Object
Coerces value.
-
#initialize(value, options = {}) ⇒ BaseCoercion
constructor
A new instance of BaseCoercion.
Constructor Details
#initialize(value, options = {}) ⇒ BaseCoercion
Returns a new instance of BaseCoercion
7 8 9 10 |
# File 'lib/contentful/coercions.rb', line 7 def initialize(value, = {}) @value = value @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options
6 7 8 |
# File 'lib/contentful/coercions.rb', line 6 def @options end |
#value ⇒ Object (readonly)
Returns the value of attribute value
6 7 8 |
# File 'lib/contentful/coercions.rb', line 6 def value @value end |
Instance Method Details
#coerce ⇒ Object
Coerces value
13 14 15 |
# File 'lib/contentful/coercions.rb', line 13 def coerce(*) value end |