Class: FlipTheSwitch::Feature

Inherits:
Struct
  • Object
show all
Defined in:
lib/flip_the_switch/feature.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, enabled, description = nil, sub_features = [], parent_name = nil) ⇒ Feature



3
4
5
# File 'lib/flip_the_switch/feature.rb', line 3

def initialize(name, enabled, description = nil, sub_features = [], parent_name = nil)
  super(name, enabled, description, sub_features, parent_name)
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description



2
3
4
# File 'lib/flip_the_switch/feature.rb', line 2

def description
  @description
end

#enabledObject

Returns the value of attribute enabled



2
3
4
# File 'lib/flip_the_switch/feature.rb', line 2

def enabled
  @enabled
end

#nameObject

Returns the value of attribute name



2
3
4
# File 'lib/flip_the_switch/feature.rb', line 2

def name
  @name
end

#parent_nameObject

Returns the value of attribute parent_name



2
3
4
# File 'lib/flip_the_switch/feature.rb', line 2

def parent_name
  @parent_name
end

#sub_featuresObject

Returns the value of attribute sub_features



2
3
4
# File 'lib/flip_the_switch/feature.rb', line 2

def sub_features
  @sub_features
end

Instance Method Details

#has_parent?Boolean



7
8
9
# File 'lib/flip_the_switch/feature.rb', line 7

def has_parent?
  parent_name
end