Class: Address::LineAbbreviator::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/address/line_abbreviator.rb

Overview

Service object: result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(original: nil, abbreviated: nil, changed: nil) ⇒ void

Parameters:

  • original (String, nil) (defaults to: nil) —

    the input line, squished

  • abbreviated (String, nil) (defaults to: nil) —

    the abbreviated line

  • changed (Boolean, nil) (defaults to: nil) —

    whether the line was modified



31
# File 'app/services/address/line_abbreviator.rb', line 31

def initialize(original: nil, abbreviated: nil, changed: nil) = super

Instance Attribute Details

#abbreviated ⇒ Object (readonly)

Returns the value of attribute abbreviated

Returns:

  • (Object) —

    the current value of abbreviated



24
25
26
# File 'app/services/address/line_abbreviator.rb', line 24

def abbreviated
  @abbreviated
end

#changed ⇒ Object (readonly) Also known as: changed?

Returns the value of attribute changed

Returns:

  • (Object) —

    the current value of changed



24
25
26
# File 'app/services/address/line_abbreviator.rb', line 24

def changed
  @changed
end

#original ⇒ Object (readonly)

Returns the value of attribute original

Returns:

  • (Object) —

    the current value of original



24
25
26
# File 'app/services/address/line_abbreviator.rb', line 24

def original
  @original
end