class TarvitHelpers::HashPresenter::WithRules::RulesHolder
Attributes
rules[R]
Public Class Methods
new()
click to toggle source
# File lib/tarvit-helpers/modules/hash_presenter/with_rules.rb, line 41 def initialize @rules = [] end
Public Instance Methods
rule_for(path)
click to toggle source
# File lib/tarvit-helpers/modules/hash_presenter/with_rules.rb, line 49 def rule_for(path) rules.find{|r| r.path == path } end
when(path, &_transform_value)
click to toggle source
# File lib/tarvit-helpers/modules/hash_presenter/with_rules.rb, line 45 def when(path, &_transform_value) self.rules << Rule.new(path, _transform_value) end