lib/garb/destination.rb in garb-0.8.5 vs lib/garb/destination.rb in garb-0.9.0
- old
+ new
@@ -1,20 +1,18 @@
module Garb
class Destination
- attr_reader :match_type, :expression, :steps
+ attr_reader :match_type, :expression, :steps, :case_sensitive
+ alias :case_sensitive? :case_sensitive
+
def initialize(attributes)
return unless attributes.is_a?(Hash)
@match_type = attributes['matchType']
@expression = attributes['expression']
@case_sensitive = (attributes['caseSensitive'] == 'true')
step_attributes = attributes[Garb.to_ga('step')]
@steps = Array(step_attributes.is_a?(Hash) ? [step_attributes] : step_attributes).map {|s| Step.new(s)}
- end
-
- def case_sensitive?
- @case_sensitive
end
end
end