Sha256: 8f279fae466c0e9b805d06473eb0cabcb7ce10d598046de112f6abcb0c0a27d6

Contents?: true

Size: 992 Bytes

Versions: 16

Compression:

Stored size: 992 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbHomeAddressStreet
    class HomeAddressStreet
      include Playbook::Props

      partial "pb_home_address_street/home_address_street"

      prop :address
      prop :address_cont
      prop :city
      prop :home_id, type: Playbook::Props::Number
      prop :home_url
      prop :house_style
      prop :state
      prop :zipcode
      prop :territory
      prop :dark, type: Playbook::Props::Boolean, default: false

      def classname
        generate_classname("pb_home_address_street_kit", dark_class)
      end

      def city_state_zip
        "#{city.titleize}, #{state} #{zipcode}"
      end

      def address_house_style
        "#{address.titleize} #{separator} #{house_style}"
      end

      def address_house_style2
        address_cont&.titleize
      end

      def separator
        house_style ? "\u00b7" : ""
      end

    private

      def dark_class
        dark ? "dark" : nil
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
playbook_ui-4.6.1 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.6.0 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.5.2 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.5.1 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.5.0 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.4.1 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.4.0 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.3.1 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.3.0 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.2.0 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.1.2 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.1.1 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.1.0 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.0.1 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-4.0.0 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
playbook_ui-3.5.0 app/pb_kits/playbook/pb_home_address_street/home_address_street.rb