Sha256: fba3956d260f14924e07171768b20ba621e00897d00954844ccebfa3f5874399

Contents?: true

Size: 637 Bytes

Versions: 6

Compression:

Stored size: 637 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 :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

6 entries across 6 versions & 1 rubygems

Version Path
rest-ftp-daemon-1.0.2 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-1.0.1 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.502.2 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.502.1 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.502.0 lib/rest-ftp-daemon/entities/location.rb
rest-ftp-daemon-0.501.0 lib/rest-ftp-daemon/entities/location.rb