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



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

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options



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

def options
  @options
end

#valueObject (readonly)

Returns the value of attribute value



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

def value
  @value
end

Instance Method Details

#coerceObject

Coerces value



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

def coerce(*)
  value
end