Module: Envoku::Resource

Defined in:
lib/envoku/resource.rb

Instance Method Summary collapse

Instance Method Details

#disable_feature!(feature) ⇒ Object


3
4
5
# File 'lib/envoku/resource.rb', line 3

def disable_feature!(feature)
  ::Envoku::Feature.new(feature).disable_for!(self)
end

#enable_feature!(feature) ⇒ Object


7
8
9
# File 'lib/envoku/resource.rb', line 7

def enable_feature!(feature)
  ::Envoku::Feature.new(feature).enable_for!(self)
end

#feature_enabled?(feature) ⇒ Boolean

Returns:

  • (Boolean)

11
12
13
# File 'lib/envoku/resource.rb', line 11

def feature_enabled?(feature)
  ::Envoku::Feature.new(feature).enabled_for?(self)
end

#features_enabledObject


15
16
17
# File 'lib/envoku/resource.rb', line 15

def features_enabled
  ::Envoku.features_enabled_for(self)
end

#toggle_feature!(feature) ⇒ Object


19
20
21
# File 'lib/envoku/resource.rb', line 19

def toggle_feature!(feature)
  ::Envoku::Feature.new(feature).toggle_for!(self)
end