Class: FlipTheSwitch::Environment

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, features = [], parent_name = nil) ⇒ Environment

Returns a new instance of Environment.



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

def initialize(name, features = [], parent_name = nil)
  super(name, features, parent_name)
end

Instance Attribute Details

#featuresObject

Returns the value of attribute features

Returns:

  • (Object)

    the current value of features



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

def features
  @features
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



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

def name
  @name
end

#parent_nameObject

Returns the value of attribute parent_name

Returns:

  • (Object)

    the current value of parent_name



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

def parent_name
  @parent_name
end

Instance Method Details

#has_parent?Boolean

Returns:

  • (Boolean)


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

def has_parent?
  parent_name
end