Class: Application
- Inherits:
-
Object
- Object
- Application
- Includes:
- Params
- Defined in:
- lib/ruby-zen/application.rb
Constant Summary
Constants included from Params
Params::GEMNAME, Params::HOMEPAGE, Params::LANGS, Params::NAME, Params::VERSION, Params::ZEN_FILENAME
Instance Attribute Summary collapse
-
#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.
11 12 13 14 |
# File 'lib/ruby-zen/application.rb', line 11 def initialize(language = :es) @lang = language @data = load_data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/ruby-zen/application.rb', line 9 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
16 17 18 |
# File 'lib/ruby-zen/application.rb', line 16 def rules @data[@lang] || :unknown end |