Class: SmallCage::Commands::Import::ImportEntry
- Inherits:
-
Object
- Object
- SmallCage::Commands::Import::ImportEntry
- Defined in:
- lib/smallcage/commands/import.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#path ⇒ Object
Returns the value of attribute path.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
171 172 173 |
# File 'lib/smallcage/commands/import.rb', line 171 def from @from end |
#path ⇒ Object
Returns the value of attribute path.
171 172 173 |
# File 'lib/smallcage/commands/import.rb', line 171 def path @path end |
#to ⇒ Object
Returns the value of attribute to.
171 172 173 |
# File 'lib/smallcage/commands/import.rb', line 171 def to @to end |
Instance Method Details
#exist? ⇒ Boolean
185 186 187 |
# File 'lib/smallcage/commands/import.rb', line 185 def exist? to.exist? end |
#external? ⇒ Boolean
181 182 183 |
# File 'lib/smallcage/commands/import.rb', line 181 def external? from.to_s =~ %r{^https?://} end |
#import ⇒ Object
173 174 175 176 177 178 179 |
# File 'lib/smallcage/commands/import.rb', line 173 def import if external? copy_external else copy_local end end |
#overwrite? ⇒ Boolean
189 190 191 |
# File 'lib/smallcage/commands/import.rb', line 189 def overwrite? to.file? end |