Class: RSlog::Decorator
- Inherits:
-
Object
- Object
- RSlog::Decorator
- Defined in:
- lib/rslog/decorator.rb
Overview
Class for load borders for table
Constant Summary collapse
- FILE_PATH =
'lib/rslog/decorators.yml'
Instance Attribute Summary collapse
-
#decorators ⇒ Object
readonly
Returns the value of attribute decorators.
Instance Method Summary collapse
-
#initialize(coding = :utf) ⇒ Decorator
constructor
A new instance of Decorator.
Constructor Details
#initialize(coding = :utf) ⇒ Decorator
Returns a new instance of Decorator.
13 14 15 16 17 18 19 20 |
# File 'lib/rslog/decorator.rb', line 13 def initialize(coding = :utf) @coding = String(coding) @decorators = YAML.load_file(FILE_PATH)[@coding] @decorators.each do |name, value| instance_variable_set("@#{name}", value) Decorator.attr_reader name.to_sym end end |
Instance Attribute Details
#decorators ⇒ Object (readonly)
Returns the value of attribute decorators.
11 12 13 |
# File 'lib/rslog/decorator.rb', line 11 def decorators @decorators end |