Class: Chaplin::Parser::DeclarationFile

Inherits:
Struct
  • Object
show all
Defined in:
lib/chaplin/parser/declaration_file.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#project_pathObject

Returns the value of attribute project_path

Returns:

  • (Object)

    the current value of project_path



7
8
9
# File 'lib/chaplin/parser/declaration_file.rb', line 7

def project_path
  @project_path
end

Class Method Details

.app_declaration(project_path) ⇒ Object



9
10
11
# File 'lib/chaplin/parser/declaration_file.rb', line 9

def self.app_declaration(project_path)
  new(project_path).app_declaration
end

Instance Method Details

#app_declarationObject



13
14
15
# File 'lib/chaplin/parser/declaration_file.rb', line 13

def app_declaration
  load_json || load_yaml || no_file_found
end

#not_found_pageObject



17
18
19
# File 'lib/chaplin/parser/declaration_file.rb', line 17

def not_found_page
  app_declaration[404]
end