def get_value(name, element = nil)
      return name.call(element) if name.respond_to? :call

      # We don't want to mess up elements names
      name = name.to_s.dup

      # Apply placeholders to the name.
      # A sample name string can look like this: page1_group[GROUP_NUMBER]_field
      # where [GROUP_NUMBER] is a placeholder. When an element is present
      # we get its placeholders and replace substrings in the name argument
      element.placeholders.each { |k, v| name[k] &&= v } if element

      elements[name].try(:value) || params[name] || name
    end
def get_value(name, element = nil)
      return name.call(element) if name.respond_to? :call

      # We don't want to mess up elements names
      name = name.to_s.dup

      # Apply placeholders to the name.
      # A sample name string can look like this: page1_group[GROUP_NUMBER]_field
      # where [GROUP_NUMBER] is a placeholder. When an element is present
      # we get its placeholders and replace substrings in the name argument
      element.placeholders.each { |k, v| name[k] &&= v } if element

      elements[name].try(:value) || params[name] || name
    end
Gets element value by element's name.
 If name is lambda - returns lambda's result
 If name is present in the resolvers' elements hash - returns element's value
 If name is present in the resolvers' params hash - returns params value
 Otherwise returns the argument without changes