Class: Confstruct::Deferred

Inherits:
Object
  • Object
show all
Defined in:
lib/confstruct/hash_with_struct_access.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Deferred

Returns a new instance of Deferred.



8
9
10
# File 'lib/confstruct/hash_with_struct_access.rb', line 8

def initialize &block
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



7
8
9
# File 'lib/confstruct/hash_with_struct_access.rb', line 7

def block
  @block
end

Instance Method Details

#inspect(full = false) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/confstruct/hash_with_struct_access.rb', line 11

def inspect(full=false)
  if full
    super
  else
    "(deferred)"
  end
end