Monkeybars::HashMappingValidation

Public Instance Methods

at_least_one_method_present?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 359
def at_least_one_method_present?
  !to_view_method.nil? or !from_view_method.nil?
end
at_least_one_property_present?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 355
def at_least_one_property_present?
  !self[:view].nil? or !self[:model].nil? or !self[:transfer].nil?
end
both_methods_present?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 343
def both_methods_present?
  ((!to_view_method.nil? and !from_view_method.nil?) or translate_using_present?)
end
both_model_and_transfer_present?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 339
def both_model_and_transfer_present?
  !self[:model].nil? and !self[:transfer].nil?
end
both_properties_and_methods?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 321
def both_properties_and_methods?
  using = (both_properties_present? and at_least_one_method_present?) 
  translation = translate_using_present?
  ((using or translation) and not (using and translation)) ? true : false
end
both_properties_present?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 335
def both_properties_present?
  !self[:view].nil? and (!self[:model].nil? or !self[:transfer].nil?)
end
from_view_method() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 371
def from_view_method
  if self[:using].kind_of? Array
    self[:using][1]
  else
    nil
  end
end
from_view_method_present?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 351
def from_view_method_present?
  !from_view_method.nil?
end
methods_only?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 327
def methods_only?
  (!at_least_one_property_present? and at_least_one_method_present?) ? true : false
end
properties_only?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 316
def properties_only?
  properties = (at_least_one_property_present? and !at_least_one_method_present?) 
  (properties and not translate_using_present?) ? true : false
end
to_view_method() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 363
def to_view_method
  if self[:using].kind_of? Array
    self[:using].first
  else
    self[:using]
  end
end
to_view_method_present?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 347
def to_view_method_present?
  !to_view_method.nil?
end
translate_using_present?() click to toggle source
# File lib/monkeybars/view_mapping.rb, line 331
def translate_using_present?
  !self[:translate_using].nil?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.