Class: Egor::EnvironmentFeature

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, symbols, labels, constrained, silent) ⇒ EnvironmentFeature

Returns a new instance of EnvironmentFeature.



6
7
8
9
10
11
12
# File 'lib/egor/environment_feature.rb', line 6

def initialize(name, symbols, labels, constrained, silent)
  @name = name
  @symbols = symbols
  @labels = labels
  @constrained = constrained
  @silent = silent
end

Instance Attribute Details

#constrainedObject

Returns the value of attribute constrained.



4
5
6
# File 'lib/egor/environment_feature.rb', line 4

def constrained
  @constrained
end

#labelsObject

Returns the value of attribute labels.



4
5
6
# File 'lib/egor/environment_feature.rb', line 4

def labels
  @labels
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/egor/environment_feature.rb', line 4

def name
  @name
end

#silentObject

Returns the value of attribute silent.



4
5
6
# File 'lib/egor/environment_feature.rb', line 4

def silent
  @silent
end

#symbolsObject

Returns the value of attribute symbols.



4
5
6
# File 'lib/egor/environment_feature.rb', line 4

def symbols
  @symbols
end

Instance Method Details

#constrained?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/egor/environment_feature.rb', line 18

def constrained?
  constrained == "T"
end

#silent?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/egor/environment_feature.rb', line 22

def silent?
  silent == "T"
end

#to_sObject



14
15
16
# File 'lib/egor/environment_feature.rb', line 14

def to_s
  [name, symbols.join, labels.join, constrained, silent].join(";")
end