Class: CanaryLabs::Feature

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, desc, participation_resolver) ⇒ Feature

Returns a new instance of Feature.



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

def initialize(name, desc, participation_resolver)
  @name = name
  @description = desc
  @participation_resolver = participation_resolver
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



17
18
19
20
21
# File 'lib/feature.rb', line 17

def == other
  return false unless other.is_a? self.class

  other.name == self.name
end

#participating?(identifier) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/feature.rb', line 13

def participating? identifier
  @participation_resolver.participating? identifier
end