Class: Haml::I18n::Extractor::HamlReader
- Inherits:
-
Object
- Object
- Haml::I18n::Extractor::HamlReader
- Defined in:
- lib/haml-i18n-extractor/haml_reader.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ HamlReader
constructor
A new instance of HamlReader.
Constructor Details
#initialize(path) ⇒ HamlReader
Returns a new instance of HamlReader.
8 9 10 11 12 13 14 15 |
# File 'lib/haml-i18n-extractor/haml_reader.rb', line 8 def initialize(path) file = File.open(path, "r") @path = path @body = file.read file.rewind @lines = file.readlines file.rewind end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/haml-i18n-extractor/haml_reader.rb', line 6 def body @body end |
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
6 7 8 |
# File 'lib/haml-i18n-extractor/haml_reader.rb', line 6 def lines @lines end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/haml-i18n-extractor/haml_reader.rb', line 6 def path @path end |