lib/right_scraper/resources/workflow.rb in right_scraper-3.2.6 vs lib/right_scraper/resources/workflow.rb in right_scraper-5.0.1

- old
+ new

@@ -1,7 +1,7 @@ #-- -# Copyright: Copyright (c) 2010-2011 RightScale, Inc. +# Copyright: Copyright (c) 2010-2013 RightScale, Inc. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # 'Software'), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, @@ -19,37 +19,36 @@ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ -module RightScraper +# ancestor +require 'right_scraper/resources' - module Resources +module RightScraper::Resources - class Workflow < Base + class Workflow < ::RightScraper::Resources::Base - METADATA_EXT = '.meta' - DEFINITION_EXT = '.def' - - # Relative path to definition file - # @pos must be set before this can be called - # - # === Return - # path(String):: Path to definition file - def definition_path - path = @pos - end + METADATA_EXT = '.meta' + DEFINITION_EXT = '.def' - # Relative path to metadata file - # @pos must be set before this can be called - # - # === Return - # path(String):: Path to metadata file - def metadata_path - path = @pos.chomp(File.extname(@pos)) + METADATA_EXT if @pos - end + # Relative path to definition file + # @pos must be set before this can be called + # + # === Return + # path(String):: Path to definition file + def definition_path + path = @pos + end + # Relative path to metadata file + # @pos must be set before this can be called + # + # === Return + # path(String):: Path to metadata file + def metadata_path + path = @pos.chomp(File.extname(@pos)) + METADATA_EXT if @pos end end -end +end