Class: Fui::Header
- Inherits:
-
Object
- Object
- Fui::Header
- Defined in:
- lib/fui/header.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#filename_without_extension ⇒ Object
Returns the value of attribute filename_without_extension.
-
#path ⇒ Object
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(path) ⇒ Header
constructor
A new instance of Header.
Constructor Details
#initialize(path) ⇒ Header
Returns a new instance of Header.
9 10 11 12 13 |
# File 'lib/fui/header.rb', line 9 def initialize(path) @path = path @filename = File.basename(path) @filename_without_extension = File.basename(path, File.extname(path)) end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
3 4 5 |
# File 'lib/fui/header.rb', line 3 def filename @filename end |
#filename_without_extension ⇒ Object
Returns the value of attribute filename_without_extension.
3 4 5 |
# File 'lib/fui/header.rb', line 3 def filename_without_extension @filename_without_extension end |
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/fui/header.rb', line 3 def path @path end |
Class Method Details
.header?(path) ⇒ Boolean
5 6 7 |
# File 'lib/fui/header.rb', line 5 def self.header?(path) File.extname(path) == '.h' end |