Class: Application
- Inherits:
-
Object
- Object
- Application
- Includes:
- Params
- Defined in:
- lib/ruby-zen/application.rb
Constant Summary
Constants included from Params
Params::GEMNAME, Params::LANGS, Params::NAME, Params::VERSION, Params::ZEN_FILENAME
Instance Attribute Summary collapse
-
#config_filepath ⇒ Object
readonly
Returns the value of attribute config_filepath.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#lang ⇒ Object
readonly
Returns the value of attribute lang.
Instance Method Summary collapse
-
#initialize(language = :es) ⇒ Application
constructor
A new instance of Application.
- #rules ⇒ Object
Constructor Details
#initialize(language = :es) ⇒ Application
Returns a new instance of Application.
12 13 14 15 |
# File 'lib/ruby-zen/application.rb', line 12 def initialize(language = :es) @lang = language @data = load_data end |
Instance Attribute Details
#config_filepath ⇒ Object (readonly)
Returns the value of attribute config_filepath.
9 10 11 |
# File 'lib/ruby-zen/application.rb', line 9 def config_filepath @config_filepath end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
10 11 12 |
# File 'lib/ruby-zen/application.rb', line 10 def data @data end |
#lang ⇒ Object (readonly)
Returns the value of attribute lang.
8 9 10 |
# File 'lib/ruby-zen/application.rb', line 8 def lang @lang end |
Instance Method Details
#rules ⇒ Object
17 18 19 |
# File 'lib/ruby-zen/application.rb', line 17 def rules @data[@lang] || :unknown end |