Class: NullObjectModels::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/null_object_models/default.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, klass) ⇒ Default

Returns a new instance of Default.



5
6
7
8
# File 'lib/null_object_models/default.rb', line 5

def initialize(id, klass)
  @id = id
  @_nom_klass = klass
end

Instance Attribute Details

#_nom_klassObject

Returns the value of attribute _nom_klass.



3
4
5
# File 'lib/null_object_models/default.rb', line 3

def _nom_klass
  @_nom_klass
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/null_object_models/default.rb', line 3

def id
  @id
end

Instance Method Details

#classObject



10
11
12
# File 'lib/null_object_models/default.rb', line 10

def class
  @_nom_delegated_class ||= NullObjectModels::NullClassDelegator.new(self)
end