Class: Edtf::Humanize::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/edtf/humanize.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/edtf/humanize.rb', line 55

def initialize
  @day_precision_strftime_format = "%B %-d, %Y"
  @month_precision_strftime_format = "%B %Y"
  @year_precision_strftime_format = "%Y"

  @approximate_date_prefix = "circa "

  @uncertain_date_suffix = "?"

  @decade_suffix = "s"
  @century_suffix = "s"

  @unspecified_digit_substitute = "x"

  @interval_connector = " to "
  @interval_unspecified_suffix = "s"

  @set_dates_connector = ", "
  @set_last_date_connector = " or "
  @set_two_dates_connector = " or "
  @set_earlier_prefix = "on or before "
  @set_later_prefix = "on or after "

  @unknown = "unknown"
end

Instance Attribute Details

#approximate_date_prefixObject

Returns the value of attribute approximate_date_prefix.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def approximate_date_prefix
  @approximate_date_prefix
end

#century_suffixObject

Returns the value of attribute century_suffix.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def century_suffix
  @century_suffix
end

#day_precision_strftime_formatObject

Returns the value of attribute day_precision_strftime_format.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def day_precision_strftime_format
  @day_precision_strftime_format
end

#decade_suffixObject

Returns the value of attribute decade_suffix.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def decade_suffix
  @decade_suffix
end

#interval_connectorObject

Returns the value of attribute interval_connector.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def interval_connector
  @interval_connector
end

#interval_unspecified_suffixObject

Returns the value of attribute interval_unspecified_suffix.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def interval_unspecified_suffix
  @interval_unspecified_suffix
end

#month_precision_strftime_formatObject

Returns the value of attribute month_precision_strftime_format.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def month_precision_strftime_format
  @month_precision_strftime_format
end

#set_dates_connectorObject

Returns the value of attribute set_dates_connector.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def set_dates_connector
  @set_dates_connector
end

#set_earlier_prefixObject

Returns the value of attribute set_earlier_prefix.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def set_earlier_prefix
  @set_earlier_prefix
end

#set_last_date_connectorObject

Returns the value of attribute set_last_date_connector.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def set_last_date_connector
  @set_last_date_connector
end

#set_later_prefixObject

Returns the value of attribute set_later_prefix.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def set_later_prefix
  @set_later_prefix
end

#set_two_dates_connectorObject

Returns the value of attribute set_two_dates_connector.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def set_two_dates_connector
  @set_two_dates_connector
end

#uncertain_date_suffixObject

Returns the value of attribute uncertain_date_suffix.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def uncertain_date_suffix
  @uncertain_date_suffix
end

#unknownObject

Returns the value of attribute unknown.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def unknown
  @unknown
end

#unspecified_digit_substituteObject

Returns the value of attribute unspecified_digit_substitute.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def unspecified_digit_substitute
  @unspecified_digit_substitute
end

#year_precision_strftime_formatObject

Returns the value of attribute year_precision_strftime_format.



38
39
40
# File 'lib/edtf/humanize.rb', line 38

def year_precision_strftime_format
  @year_precision_strftime_format
end