Class: Application::Configuration::Location
- Defined in:
- lib/application_configuration.rb
Constant Summary collapse
- FILE =
:file
- URL =
:url
- HASH =
:hash
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(loc, type = Application::Configuration::Location::FILE) ⇒ Location
constructor
A new instance of Location.
Constructor Details
#initialize(loc, type = Application::Configuration::Location::FILE) ⇒ Location
Returns a new instance of Location.
207 208 209 210 |
# File 'lib/application_configuration.rb', line 207 def initialize(loc, type = Application::Configuration::Location::FILE) self.type = type self.name = loc end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
204 205 206 |
# File 'lib/application_configuration.rb', line 204 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
205 206 207 |
# File 'lib/application_configuration.rb', line 205 def @options end |
#type ⇒ Object
Returns the value of attribute type.
203 204 205 |
# File 'lib/application_configuration.rb', line 203 def type @type end |
Class Method Details
.supported_types ⇒ Object
212 213 214 |
# File 'lib/application_configuration.rb', line 212 def self.supported_types [Application::Configuration::Location::FILE, Application::Configuration::Location::URL, Application::Configuration::Location::HASH] end |
Instance Method Details
#==(other) ⇒ Object
220 221 222 |
# File 'lib/application_configuration.rb', line 220 def ==(other) self.name.to_s == other.name.to_s end |
#eql?(other) ⇒ Boolean
224 225 226 |
# File 'lib/application_configuration.rb', line 224 def eql?(other) self.name.to_s == other.name.to_s end |
#hash ⇒ Object
228 229 230 |
# File 'lib/application_configuration.rb', line 228 def hash self.name.to_s.hash end |