Sha256: 1d7e4bef5d74517fb06479fde6117552eea1b065ae8bcfc936e2cc00dda180be
Contents?: true
Size: 1.53 KB
Versions: 6
Compression:
Stored size: 1.53 KB
Contents
class Customer attr_accessor :customer_id, :customer_name, :company_name attr_accessor :street_address_1, :street_address_2 # attr_accessor :city, :state, :postal_code MY_CONSTANT = "TheOtherZachIsThePrimaryZach" def self.api_root end def my_condition puts "MAGIC" if true == false end def address_is_residence? self.company_name.nil? end def get_coords_for_address # fake_api_call(city: city, state: state, postal_code: postal_code) end def neighborhood make_neighborhood_api_call(state: self.state, city: self.city, postal_code: self.postal_code) end def something_else # fake_neighborhood_api_call(city: self.city, state: self.state) end def and_something_else_again fake_neighborhood_api_call(city: self.city) end def and_something_else_again_and_again fake_neighborhood_api_call(state: self.state) end def fake_neighborhood_api_call(args={}) "Probably River North" end def fake_api_call(args={}) [112.32, 124.11] end def business_card_api_call {name: customer_name, business: company_name} end def letterhead_api_call {name: customer_name, business: company_name} end def letterhead "#{customer_name}\r#{company_name}" end def address string = "" string << self.customer_name string << self.company_name if address_is_residence? string << self.street_address_1 string << self.street_address_2 if street_address_2.present? # string << "#{self.city}, #{self.state} #{self.postal_code}" string.join", " end end
Version data entries
6 entries across 6 versions & 1 rubygems