Class: Dobby::UpdateResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/dobby/update_response.rb

Overview

A generic response format.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(changed, content = nil) ⇒ UpdateResponse

Returns a new instance of UpdateResponse.

Parameters:

  • changed (Boolean)
  • content (Hash) (defaults to: nil)


9
10
11
12
# File 'lib/dobby/update_response.rb', line 9

def initialize(changed, content = nil)
  @changed = changed
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



6
7
8
# File 'lib/dobby/update_response.rb', line 6

def content
  @content
end

Instance Method Details

#changed?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/dobby/update_response.rb', line 15

def changed?
  @changed == true
end