Class: Trebuchet::Strategy::Invalid

Inherits:
Base
  • Object
show all
Defined in:
lib/trebuchet/strategy/invalid.rb

Overview

Default is to not launch the feature to anyone

Instance Attribute Summary collapse

Attributes inherited from Base

#feature

Instance Method Summary collapse

Methods inherited from Base

#as_json, #export, #feature_id, #inspect, strategy_name

Constructor Details

#initialize(name, options = nil) ⇒ Invalid

Returns a new instance of Invalid.



6
7
8
9
# File 'lib/trebuchet/strategy/invalid.rb', line 6

def initialize(name, options = nil)
  @invalid_name = name
  @options = options
end

Instance Attribute Details

#invalid_nameObject (readonly)

Returns the value of attribute invalid_name.



4
5
6
# File 'lib/trebuchet/strategy/invalid.rb', line 4

def invalid_name
  @invalid_name
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/trebuchet/strategy/invalid.rb', line 4

def options
  @options
end

Instance Method Details

#launch_at?(user, request = nil) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/trebuchet/strategy/invalid.rb', line 15

def launch_at?(user, request = nil)
  false
end

#nameObject



11
12
13
# File 'lib/trebuchet/strategy/invalid.rb', line 11

def name
  :invalid
end

#needs_user?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/trebuchet/strategy/invalid.rb', line 19

def needs_user?
  false
end

#to_sObject



23
24
25
# File 'lib/trebuchet/strategy/invalid.rb', line 23

def to_s
  "#{invalid_name} (invalid) #{options.inspect if options}"
end