Module: ResourceSubscriber::Resourceful

Extended by:
ActiveSupport::Concern
Defined in:
lib/resource_subscriber/resourceful.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#changesObject

Returns the value of attribute changes.



5
6
7
# File 'lib/resource_subscriber/resourceful.rb', line 5

def changes
  @changes
end

#resourceObject

Returns the value of attribute resource.



5
6
7
# File 'lib/resource_subscriber/resourceful.rb', line 5

def resource
  @resource
end

Instance Method Details

#initialize(*args) ⇒ Object



7
8
9
10
11
12
# File 'lib/resource_subscriber/resourceful.rb', line 7

def initialize(*args)
  super(*args)

  @resource = env["resource"]
  @changes = env["changes"]
end

#was_changed?(*args, **options) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/resource_subscriber/resourceful.rb', line 14

def was_changed?(*args, **options)
  @changes.was_changed?(*args, **options)
end