Class: BOSSMan::BaseValueObject

Inherits:
Object
  • Object
show all
Defined in:
lib/bossman/basevalueobject.rb

Direct Known Subclasses

Result, ResultSet

Instance Method Summary collapse

Instance Method Details

#set_parameter(key, value) ⇒ Object



4
5
6
7
# File 'lib/bossman/basevalueobject.rb', line 4

def set_parameter(key, value)
  instance_variable_set("@#{key}", value) 
  instance_eval("def #{key}; @#{key}; end")
end

#to_jsonObject



13
14
15
# File 'lib/bossman/basevalueobject.rb', line 13

def to_json
  ActiveSupport::JSON.encode(@response)
end

#to_yamlObject



9
10
11
# File 'lib/bossman/basevalueobject.rb', line 9

def to_yaml
  @response.to_yaml
end