Class: BOSSMan::BaseValueObject
- Inherits:
-
Object
- Object
- BOSSMan::BaseValueObject
show all
- Defined in:
- lib/bossman/base_value_object.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
15
16
17
18
|
# File 'lib/bossman/base_value_object.rb', line 15
def method_missing(*args)
method = args.first
instance_variable_get("@#{method}")
end
|
Instance Method Details
#set_parameter(key, value) ⇒ Object
3
4
5
|
# File 'lib/bossman/base_value_object.rb', line 3
def set_parameter(key, value)
instance_variable_set("@#{key}", value)
end
|
#to_json ⇒ Object
11
12
13
|
# File 'lib/bossman/base_value_object.rb', line 11
def to_json
ActiveSupport::JSON.encode(@response)
end
|
#to_yaml ⇒ Object
7
8
9
|
# File 'lib/bossman/base_value_object.rb', line 7
def to_yaml
@response.to_yaml
end
|