Class: ActiveAgent::Delegation::Pricing::Rate
- Inherits:
-
Struct
- Object
- Struct
- ActiveAgent::Delegation::Pricing::Rate
- Defined in:
- lib/active_agent/delegation/pricing.rb
Overview
A registered rate card.
Instance Attribute Summary collapse
-
#input ⇒ Object
Returns the value of attribute input.
-
#output ⇒ Object
Returns the value of attribute output.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
Instance Method Summary collapse
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input
24 25 26 |
# File 'lib/active_agent/delegation/pricing.rb', line 24 def input @input end |
#output ⇒ Object
Returns the value of attribute output
24 25 26 |
# File 'lib/active_agent/delegation/pricing.rb', line 24 def output @output end |
#pattern ⇒ Object
Returns the value of attribute pattern
24 25 26 |
# File 'lib/active_agent/delegation/pricing.rb', line 24 def pattern @pattern end |
Instance Method Details
#matches?(model) ⇒ Boolean
27 28 29 30 31 32 |
# File 'lib/active_agent/delegation/pricing.rb', line 27 def matches?(model) case pattern when Regexp then pattern.match?(model) else model.to_s.start_with?(pattern.to_s) end end |