Class: CheckMot::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/check_mot/resource.rb

Instance Method Summary collapse

Constructor Details

#initialize(source_hash) ⇒ Resource

Returns a new instance of Resource.



4
5
6
# File 'lib/check_mot/resource.rb', line 4

def initialize(source_hash)
  @source_hash = source_hash
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



12
13
14
# File 'lib/check_mot/resource.rb', line 12

def method_missing(name, *args)
  resolved_attribute(name)
end

Instance Method Details

#inspectObject



16
17
18
19
# File 'lib/check_mot/resource.rb', line 16

def inspect
  # prevents extraneous output in the console:
  to_s
end

#respond_to_missing?(name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/check_mot/resource.rb', line 8

def respond_to_missing?(name, include_private = false)
  true
end