Module: Versacommerce::ThemeAPIClient::Resources::FileBehaviour
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/versacommerce/theme_api_client/resources/file_behaviour.rb
Instance Method Summary collapse
Instance Method Details
#==(other) ⇒ Object
30 31 32 |
# File 'lib/versacommerce/theme_api_client/resources/file_behaviour.rb', line 30 def ==(other) other.kind_of?(self.class) && path == other.path end |
#name ⇒ Object
26 27 28 |
# File 'lib/versacommerce/theme_api_client/resources/file_behaviour.rb', line 26 def name path.basename.to_s end |
#path=(value) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/versacommerce/theme_api_client/resources/file_behaviour.rb', line 17 def path=(value) path = Pathname.new(value.sub(/\A\/*/, '')) unless path == @path path_will_change! @path = path end end |