Class: Apia::GeneratedHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/apia/generated_hash.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, source, path: nil) ⇒ GeneratedHash

Returns a new instance of GeneratedHash.



10
11
12
13
14
15
# File 'lib/apia/generated_hash.rb', line 10

def initialize(object, source, path: nil)
  super()
  @object = object
  @source = source
  @path = path
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



6
7
8
# File 'lib/apia/generated_hash.rb', line 6

def object
  @object
end

#pathObject (readonly)

Returns the value of attribute path.



8
9
10
# File 'lib/apia/generated_hash.rb', line 8

def path
  @path
end

#sourceObject (readonly)

Returns the value of attribute source.



7
8
9
# File 'lib/apia/generated_hash.rb', line 7

def source
  @source
end

Class Method Details

.enableObject



23
24
25
# File 'lib/apia/generated_hash.rb', line 23

def enable
  @enabled = true
end

.enabled?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/apia/generated_hash.rb', line 19

def enabled?
  @enabled == true
end