Class: StrawberryAPI::Strategy
- Inherits:
-
Object
- Object
- StrawberryAPI::Strategy
- Defined in:
- lib/strawberry_api/strategy.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#admin_only ⇒ Object
Returns the value of attribute admin_only.
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#format ⇒ Object
Returns the value of attribute format.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Strategy
constructor
A new instance of Strategy.
Constructor Details
#initialize(params = {}) ⇒ Strategy
Returns a new instance of Strategy
12 13 14 15 16 |
# File 'lib/strawberry_api/strategy.rb', line 12 def initialize(params = {}) params.each do |k, v| instance_variable_set("@#{k}", v) unless v.nil? end end |
Instance Attribute Details
#admin_only ⇒ Object
Returns the value of attribute admin_only
9 10 11 |
# File 'lib/strawberry_api/strategy.rb', line 9 def admin_only @admin_only end |
#destination ⇒ Object
Returns the value of attribute destination
7 8 9 |
# File 'lib/strawberry_api/strategy.rb', line 7 def destination @destination end |
#enabled ⇒ Object
Returns the value of attribute enabled
10 11 12 |
# File 'lib/strawberry_api/strategy.rb', line 10 def enabled @enabled end |
#format ⇒ Object
Returns the value of attribute format
8 9 10 |
# File 'lib/strawberry_api/strategy.rb', line 8 def format @format end |
#id ⇒ Object
Returns the value of attribute id
5 6 7 |
# File 'lib/strawberry_api/strategy.rb', line 5 def id @id end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/strawberry_api/strategy.rb', line 6 def name @name end |