Class: Garb::Destination
- Inherits:
-
Object
- Object
- Garb::Destination
- Defined in:
- lib/garb/destination.rb
Instance Attribute Summary collapse
-
#case_sensitive ⇒ Object
(also: #case_sensitive?)
readonly
Returns the value of attribute case_sensitive.
-
#match_type ⇒ Object
readonly
Returns the value of attribute match_type.
-
#steps ⇒ Object
readonly
Returns the value of attribute steps.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Destination
constructor
A new instance of Destination.
Constructor Details
#initialize(attributes) ⇒ Destination
Returns a new instance of Destination.
7 8 9 10 11 12 13 14 15 |
# File 'lib/garb/destination.rb', line 7 def initialize(attributes) return unless attributes.is_a? Hash @match_type = attributes['matchType'] @url = attributes['url'] # TODO was @expression @case_sensitive = attributes['caseSensitive'] @steps = attributes['steps'] && attributes['steps'].map { |s| Step.new(s) } end |
Instance Attribute Details
#case_sensitive ⇒ Object (readonly) Also known as: case_sensitive?
Returns the value of attribute case_sensitive.
3 4 5 |
# File 'lib/garb/destination.rb', line 3 def case_sensitive @case_sensitive end |
#match_type ⇒ Object (readonly)
Returns the value of attribute match_type.
3 4 5 |
# File 'lib/garb/destination.rb', line 3 def match_type @match_type end |
#steps ⇒ Object (readonly)
Returns the value of attribute steps.
3 4 5 |
# File 'lib/garb/destination.rb', line 3 def steps @steps end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/garb/destination.rb', line 3 def url @url end |