Class: Lang

Inherits:
Object
  • Object
show all
Includes:
TextActions
Defined in:
lib/asker/lang/lang.rb

Overview

Lang#lang

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from TextActions

#build_text_from_filtered, #count_words, #do_mistake_to, #hide_text, #text_filter_connectors, #text_for, #text_with_connectors, #text_without_connectors

Constructor Details

#initialize(code = 'en') ⇒ Lang

Returns a new instance of Lang.



14
15
16
17
# File 'lib/asker/lang/lang.rb', line 14

def initialize(code = 'en')
  @code = code.to_s
  load_files
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



12
13
14
# File 'lib/asker/lang/lang.rb', line 12

def code
  @code
end

#mistakesObject (readonly)

Returns the value of attribute mistakes.



12
13
14
# File 'lib/asker/lang/lang.rb', line 12

def mistakes
  @mistakes
end

Instance Method Details

#langObject



19
20
21
# File 'lib/asker/lang/lang.rb', line 19

def lang
  @code
end