Class: Shapeable::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/shapeable/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



12
13
14
15
16
17
18
19
20
# File 'lib/shapeable/configuration.rb', line 12

def initialize
  @path = nil
  @default_version = nil
  @default_shape = nil
  @enforce_versioning = true
  @enforce_shape = true
  @shape_attr_override = nil
  @version_attr_override = nil
end

Instance Attribute Details

#default_shapeObject

Returns the value of attribute default_shape.



4
5
6
# File 'lib/shapeable/configuration.rb', line 4

def default_shape
  @default_shape
end

#default_versionObject

Returns the value of attribute default_version.



4
5
6
# File 'lib/shapeable/configuration.rb', line 4

def default_version
  @default_version
end

#enforce_shapeObject

Returns the value of attribute enforce_shape.



4
5
6
# File 'lib/shapeable/configuration.rb', line 4

def enforce_shape
  @enforce_shape
end

#enforce_versioningObject

Returns the value of attribute enforce_versioning.



4
5
6
# File 'lib/shapeable/configuration.rb', line 4

def enforce_versioning
  @enforce_versioning
end

#pathObject

Returns the value of attribute path.



4
5
6
# File 'lib/shapeable/configuration.rb', line 4

def path
  @path
end

#shape_attr_overrideObject

Returns the value of attribute shape_attr_override.



4
5
6
# File 'lib/shapeable/configuration.rb', line 4

def shape_attr_override
  @shape_attr_override
end

#version_attr_overrideObject

Returns the value of attribute version_attr_override.



4
5
6
# File 'lib/shapeable/configuration.rb', line 4

def version_attr_override
  @version_attr_override
end

Instance Method Details

#as_jsonObject



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/shapeable/configuration.rb', line 22

def as_json
  {
    path: path,
    default_version: default_version,
    default_shape: default_shape,
    enforce_versioning: enforce_versioning,
    enforce_shape: enforce_shape,
    shape_attr_override: shape_attr_override,
    version_attr_override: version_attr_override
  }
end