Class: DateHolidays::Reader::Config
- Inherits:
-
Object
- Object
- DateHolidays::Reader::Config
- Defined in:
- lib/date_holidays/reader/config.rb
Overview
Tells the gem how to interact with Node and provides a list of countries. See the configuration section of the Readme for more inforamtion.
Class Attribute Summary collapse
- .default ⇒ Object
-
.node_path ⇒ Object
Returns the value of attribute node_path.
Instance Attribute Summary collapse
-
#node_path ⇒ Object
readonly
Returns the value of attribute node_path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(node_path: nil) ⇒ Config
constructor
A new instance of Config.
- #native_linux? ⇒ Boolean
- #native_mac? ⇒ Boolean
Constructor Details
#initialize(node_path: nil) ⇒ Config
Returns a new instance of Config.
39 40 41 42 43 |
# File 'lib/date_holidays/reader/config.rb', line 39 def initialize(node_path: nil) @node_path = node_path freeze end |
Class Attribute Details
.default ⇒ Object
28 29 30 |
# File 'lib/date_holidays/reader/config.rb', line 28 def default @default ||= new(node_path: node_path) end |
.node_path ⇒ Object
Returns the value of attribute node_path.
19 20 21 |
# File 'lib/date_holidays/reader/config.rb', line 19 def node_path @node_path end |
Instance Attribute Details
#node_path ⇒ Object (readonly)
Returns the value of attribute node_path.
37 38 39 |
# File 'lib/date_holidays/reader/config.rb', line 37 def node_path @node_path end |
Class Method Details
Instance Method Details
#native_linux? ⇒ Boolean
49 50 51 |
# File 'lib/date_holidays/reader/config.rb', line 49 def native_linux? OS.linux? && OS.bits == SUPPORTED_CPU_BITS end |
#native_mac? ⇒ Boolean
45 46 47 |
# File 'lib/date_holidays/reader/config.rb', line 45 def native_mac? OS.osx? && OS.bits == SUPPORTED_CPU_BITS end |