class Epuber::Book::FileRequest
Attributes
@return [Symbol]
When looking for file, the resulted list should contain only one file
Default: true
@return [Bool]
@return [Set<String>]
@return [String]
Public Class Methods
Source
# File lib/epuber/book/file_request.rb, line 32 def initialize(source_pattern, only_one: true, group: nil, properties: []) @source_pattern = source_pattern @only_one = only_one @group = group @properties = properties.to_set end
@param [String] source_pattern
pattern describing path to file @param [Bool] only_one
find only one file, otherwise look for all files matching pattern in project @param [Symbol] group group of file, see Epuber::Compiler::FileFinder::GROUP_EXTENSIONS @param [Array<Symbol>, Set<Symbol>] properties list of properties
Public Instance Methods
Source
# File lib/epuber/book/file_request.rb, line 53 def ==(other) if other.is_a?(String) @source_pattern == other else @source_pattern == other.source_pattern && @group == other.group && @only_one == other.only_one end end
@param [String, self] other
Source
# File lib/epuber/book/file_request.rb, line 41 def eql?(other) self == other end
@return [Bool]
Source
# File lib/epuber/book/file_request.rb, line 47 def hash [@source_pattern, @group, @only_one].hash end
@return [Numeric]
Source
# File lib/epuber/book/file_request.rb, line 63 def to_s "#<#{self.class} pattern:`#{@source_pattern}` group:`#{@group}` only_one:`#{@only_one}`>" end
@return [String]