Class: Fui::Header
- Inherits:
-
Object
- Object
- Fui::Header
- Defined in:
- lib/fui/header.rb
Overview
Represents a Header (.h) file
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.
10 11 12 13 14 |
# File 'lib/fui/header.rb', line 10 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.
4 5 6 |
# File 'lib/fui/header.rb', line 4 def filename @filename end |
#filename_without_extension ⇒ Object
Returns the value of attribute filename_without_extension.
4 5 6 |
# File 'lib/fui/header.rb', line 4 def filename_without_extension @filename_without_extension end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/fui/header.rb', line 4 def path @path end |
Class Method Details
.header?(path) ⇒ Boolean
6 7 8 |
# File 'lib/fui/header.rb', line 6 def self.header?(path) File.extname(path) == '.h' end |