Class: Contentful::BaseCoercion

Inherits:
Object
  • Object
show all
Defined in:
lib/contentful/coercions.rb

Overview

Basic Coercion

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, options = {}) ⇒ BaseCoercion

Returns a new instance of BaseCoercion.



8
9
10
11
# File 'lib/contentful/coercions.rb', line 8

def initialize(value, options = {})
  @value = value
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/contentful/coercions.rb', line 7

def options
  @options
end

#valueObject (readonly)

Returns the value of attribute value.



7
8
9
# File 'lib/contentful/coercions.rb', line 7

def value
  @value
end

Instance Method Details

#coerceObject

Coerces value



14
15
16
# File 'lib/contentful/coercions.rb', line 14

def coerce(*)
  value
end