Class: Application

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#dataObject (readonly)

Returns the value of attribute data.



9
10
11
# File 'lib/ruby-zen/application.rb', line 9

def data
  @data
end

#langObject (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

#rulesObject



16
17
18
# File 'lib/ruby-zen/application.rb', line 16

def rules
  @data[@lang] || :unknown
end