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.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/edtf/humanize.rb', line 49

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 "
end

Instance Attribute Details

#approximate_date_prefixObject

Returns the value of attribute approximate_date_prefix.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def approximate_date_prefix
  @approximate_date_prefix
end

#century_suffixObject

Returns the value of attribute century_suffix.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def century_suffix
  @century_suffix
end

#day_precision_strftime_formatObject

Returns the value of attribute day_precision_strftime_format.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def day_precision_strftime_format
  @day_precision_strftime_format
end

#decade_suffixObject

Returns the value of attribute decade_suffix.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def decade_suffix
  @decade_suffix
end

#interval_connectorObject

Returns the value of attribute interval_connector.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def interval_connector
  @interval_connector
end

#interval_unspecified_suffixObject

Returns the value of attribute interval_unspecified_suffix.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def interval_unspecified_suffix
  @interval_unspecified_suffix
end

#month_precision_strftime_formatObject

Returns the value of attribute month_precision_strftime_format.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def month_precision_strftime_format
  @month_precision_strftime_format
end

#set_dates_connectorObject

Returns the value of attribute set_dates_connector.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def set_dates_connector
  @set_dates_connector
end

#set_last_date_connectorObject

Returns the value of attribute set_last_date_connector.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def set_last_date_connector
  @set_last_date_connector
end

#set_two_dates_connectorObject

Returns the value of attribute set_two_dates_connector.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def set_two_dates_connector
  @set_two_dates_connector
end

#uncertain_date_suffixObject

Returns the value of attribute uncertain_date_suffix.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def uncertain_date_suffix
  @uncertain_date_suffix
end

#unspecified_digit_substituteObject

Returns the value of attribute unspecified_digit_substitute.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def unspecified_digit_substitute
  @unspecified_digit_substitute
end

#year_precision_strftime_formatObject

Returns the value of attribute year_precision_strftime_format.



35
36
37
# File 'lib/edtf/humanize.rb', line 35

def year_precision_strftime_format
  @year_precision_strftime_format
end