Sha256: 17050b20eedfe8b622b3a25bbe9a6079664ace13fb94c06cdc21e3a86670bbf3

Contents?: true

Size: 659 Bytes

Versions: 13

Compression:

Stored size: 659 Bytes

Contents

require "grape-entity"

module RestFtpDaemon
  module Entities
    class Location < Grape::Entity

      expose :url
      #, as: 'raw'
      # expose :uri
      expose :scheme

      expose :host, unless: Proc.new {|obj| obj.host.nil?}
      expose :user, unless: Proc.new {|obj| obj.user.nil?}
      expose :port, if: Proc.new {|obj| !obj.port.nil?}

      expose :dir
      expose :name
      expose :path
      expose :path_fs

      expose :aws_region ,unless: Proc.new {|obj| obj.aws_region.nil?}
      expose :aws_bucket, unless: Proc.new {|obj| obj.aws_bucket.nil?}
      expose :aws_id,     unless: Proc.new {|obj| obj.aws_id.nil?}

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rest-ftp-daemon-1.1.1 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.1.0 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.15 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.14 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.13 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.12 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.11 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.10 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.9 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.8 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.7 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.6 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.5 lib/rest-ftp-daemon/entities/location.rb