Class: CiInACan::ViewModels::ViewModel

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_in_a_can/view_models/view_model.rb

Instance Method Summary collapse

Constructor Details

#initialize(value = nil) ⇒ ViewModel

Returns a new instance of ViewModel.



7
8
9
# File 'lib/ci_in_a_can/view_models/view_model.rb', line 7

def initialize value = nil
  @value = value
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &blk) ⇒ Object



15
16
17
# File 'lib/ci_in_a_can/view_models/view_model.rb', line 15

def method_missing(meth, *args, &blk)
  @value.send(meth)
end

Instance Method Details

#the_original_valueObject



11
12
13
# File 'lib/ci_in_a_can/view_models/view_model.rb', line 11

def the_original_value
  @value
end