Class: WEEL::ManipulateStructure

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

Overview

}}}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, endpoints, status) ⇒ ManipulateStructure

{{{



81
82
83
84
85
86
87
88
# File 'lib/weel.rb', line 81

def initialize(data,endpoints,status)
  @__weel_data = data
  @__weel_endpoints = endpoints
  @__weel_status = status
  @changed_status = status.id
  @changed_data = []
  @changed_endpoints = []
end

Instance Attribute Details

#changed_dataObject (readonly)

Returns the value of attribute changed_data.



90
91
92
# File 'lib/weel.rb', line 90

def changed_data
  @changed_data
end

#changed_endpointsObject (readonly)

Returns the value of attribute changed_endpoints.



90
91
92
# File 'lib/weel.rb', line 90

def changed_endpoints
  @changed_endpoints
end

Instance Method Details

#changed_statusObject



100
101
102
# File 'lib/weel.rb', line 100

def changed_status
  @changed_status != status.id
end

#dataObject



104
105
106
# File 'lib/weel.rb', line 104

def data
  ManipulateHash.new(@__weel_data,@changed_data)
end

#endpointsObject



107
108
109
# File 'lib/weel.rb', line 107

def endpoints
  ManipulateHash.new(@__weel_endpoints,@changed_endpoints)
end

#original_dataObject



92
93
94
# File 'lib/weel.rb', line 92

def original_data
  @__weel_data
end

#original_endpointsObject



96
97
98
# File 'lib/weel.rb', line 96

def original_endpoints
  @__weel_endpoints
end

#statusObject



110
111
112
# File 'lib/weel.rb', line 110

def status
  @__weel_status
end