Class: Meteoroid::File
- Inherits:
-
Object
- Object
- Meteoroid::File
- Defined in:
- lib/meteoroid/file.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#valid ⇒ Object
readonly
Returns the value of attribute valid.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file) ⇒ File
constructor
A new instance of File.
- #samples ⇒ Object
Constructor Details
#initialize(file) ⇒ File
Returns a new instance of File.
5 6 7 8 |
# File 'lib/meteoroid/file.rb', line 5 def initialize(file) @file = file @xml = parse_xml(file) end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
3 4 5 |
# File 'lib/meteoroid/file.rb', line 3 def file @file end |
#valid ⇒ Object (readonly)
Returns the value of attribute valid.
3 4 5 |
# File 'lib/meteoroid/file.rb', line 3 def valid @valid end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
3 4 5 |
# File 'lib/meteoroid/file.rb', line 3 def xml @xml end |
Class Method Details
.from(args) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/meteoroid/file.rb', line 10 def self.from args args.collect do |arg| file = new(arg) file.valid ? file : nil end.compact end |